merging with main

This commit is contained in:
2020-07-16 18:59:00 +02:00
parent 71a8a7aaed
commit 5d10eb17af
18 changed files with 14 additions and 2 deletions

View File

@@ -7,6 +7,7 @@
<sourceFolder url="file://$MODULE_DIR$/fileReader" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/fileWriter" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/time" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/dataStructure" isTestSource="false" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />

View File

@@ -7,5 +7,6 @@
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="module" module-name="TOOLS" exported="" />
</component>
</module>

View File

@@ -132,7 +132,7 @@ public class Board extends JPanel implements ActionListener {
}
}
//check if computer needs to take a turn
if (game.isTurnTaken() && game.emptyTiles() != 0){
if (game.isTurnTaken()){
game.setTurnTaken(false);
game.computersTurn();
}

View File

@@ -70,7 +70,7 @@ public class Game {
}
return false;
}
public int emptyTiles(){
int n = 9;
for (int i = 0; i < playfield.length; i++){
@@ -78,6 +78,7 @@ public class Game {
n -= 1;
}
}
System.out.println(n);
return n;
}

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -0,0 +1,9 @@
Variables:
player, board, search_depth
Data_structure:
BinaryTree
Loops:
recursion
for-loop