Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Game over logic #1

Open
wants to merge 7 commits into
base: Updating-Baagh-stuff
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions Project_CPP/Baagh.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#pragma once

#include"Baagh.h"


Baagh:: Baagh() {}
tigerState Baagh::getState()
{
return state;
}
void Baagh::setState(tigerState s)
{
state = s;
}

16 changes: 16 additions & 0 deletions Project_CPP/Baagh.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#pragma once
#include"Animal.h"
#include<iostream>
enum tigerState { Free, trapped };
class Baagh : public Animal
{
private:
tigerState state = Free;
public:
Baagh();
tigerState getState();

void setState(tigerState s);


};
17 changes: 8 additions & 9 deletions Project_CPP/Bakhraa.h
Original file line number Diff line number Diff line change
@@ -1,20 +1,19 @@


#pragma once
#include<iostream>
#include"Animal.h"

static int bakhraa_count = 0;
static int bakhraa_killed = 0;
static int bakhraa_remain = 20;
enum goatstate { dead, alive };
//static int bakhraa_count = 0;
//static int bakhraa_killed = 0;
//static int bakhraa_remain = 20;
enum goatstate { Dead, alive };
class Bakhraa : public Animal
{
private:
goatstate state = dead;
goatstate state = Dead;
public:
Bakhraa();
//construtor can be used to draw sfml or display texture of bakhraa
//construtor can be used to draw sfml or display texture of bakhraa
goatstate getstate();//just to get state of 'x
void setstate(goatstate sate);//to set state of individual

};
};
Binary file added Project_CPP/baghchal-app
Binary file not shown.
Loading