Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Absturz-Bug behoben, Spiel laueft, Einschraenkungen fuer die Spielfig…
…uren fehlen, Ueberfluessige Dateien entfernt
  • Loading branch information
unknown authored and unknown committed Jun 3, 2012
commit 3a88aa8cc7a62b0ebe2a0dcdf74bf01517c0a8fb
14 changes: 3 additions & 11 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
# Compiled Object files

*.slo

*.lo

*.o


Expand All @@ -15,30 +13,24 @@
# Compiled Static libraries

*.lai

*.la

*.a


# Output files

*.exe

*.d


#Eclipse Folder

.settings

Debug

.cproject

.project


.metadata

#Bilder
*.bmp
*.bmp

36 changes: 36 additions & 0 deletions Chess/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Compiled Object files

*.slo
*.lo
*.o


# Compiled Dynamic libraries

*.so


# Compiled Static libraries

*.lai
*.la
*.a


# Output files

*.exe
*.d


#Eclipse Folder

.settings
Debug
.cproject
.project
.metadata

#Bilder
*.bmp

13 changes: 0 additions & 13 deletions Chess/.settings/org.eclipse.cdt.managedbuilder.core.prefs

This file was deleted.

Binary file removed Chess/Debug/Chess.exe
Binary file not shown.
Binary file removed Chess/Debug/Interface/interface.o
Binary file not shown.
Binary file removed Chess/Debug/Piece/bauer.o
Binary file not shown.
Binary file removed Chess/Debug/Piece/piece.o
Binary file not shown.
Binary file removed Chess/Debug/chess.o
Binary file not shown.
Binary file removed Chess/Debug/game/game.o
Binary file not shown.
6 changes: 3 additions & 3 deletions Chess/Interface/interface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ void Interface::einlesen(int p)
{
std::cout << "Spieler " << p << ": Bitte Zug eingeben: ";

//std::cin >> p1a >> p1b >> p2a >> p2b;
p1a='e';
std::cin >> p1a >> p1b >> p2a >> p2b;
/*p1a='e';
p2a='e';
p1b=2;
p2b=4;
p2b=4;*/
}

void Interface::ausgabe(brett* b)
Expand Down
2 changes: 1 addition & 1 deletion Chess/game/brett.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ char brett::lese(int x,int y)

bool brett::schreibe(int x,int y,char value)
{
if ((x>=0) && (x<8) && (y>0) && (y<8))
if ((x>=0) && (x<8) && (y>=0) && (y<8))
{
f[x+8*y]=value;
return true;
Expand Down
10 changes: 8 additions & 2 deletions Chess/game/game.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

Game::Game()
{
brett* b=new brett();
b=new brett();
for (int i=0;i<8;i++)
{
b->schreibe(i,1,'b');
Expand Down Expand Up @@ -53,6 +53,11 @@ Game::Game()
return;
}

Game::~Game()
{
delete b;
}

void Game::zug()
{
do
Expand All @@ -71,7 +76,7 @@ void Game::zug()

for (int i=0;i<8;i++)
{
for (int j=1;j<8;j++)
for (int j=0;j<8;j++)
{
if (b->lese(i,j)=='K') { k1=true; }
if (b->lese(i,j)=='k') { k2=true; }
Expand Down Expand Up @@ -137,3 +142,4 @@ int Game::aendern(char a,int be,char c,int d)




2 changes: 1 addition & 1 deletion Chess/game/game.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class Game
Game();
void zug();
int aendern(char a,int b,char c,int d);

~Game();
};

#endif /* GAME_H_ */