merging with main
This commit is contained in:
@@ -7,6 +7,7 @@
|
|||||||
<sourceFolder url="file://$MODULE_DIR$/fileReader" isTestSource="false" />
|
<sourceFolder url="file://$MODULE_DIR$/fileReader" isTestSource="false" />
|
||||||
<sourceFolder url="file://$MODULE_DIR$/fileWriter" isTestSource="false" />
|
<sourceFolder url="file://$MODULE_DIR$/fileWriter" isTestSource="false" />
|
||||||
<sourceFolder url="file://$MODULE_DIR$/time" isTestSource="false" />
|
<sourceFolder url="file://$MODULE_DIR$/time" isTestSource="false" />
|
||||||
|
<sourceFolder url="file://$MODULE_DIR$/dataStructure" isTestSource="false" />
|
||||||
</content>
|
</content>
|
||||||
<orderEntry type="inheritedJdk" />
|
<orderEntry type="inheritedJdk" />
|
||||||
<orderEntry type="sourceFolder" forTests="false" />
|
<orderEntry type="sourceFolder" forTests="false" />
|
||||||
|
|||||||
@@ -7,5 +7,6 @@
|
|||||||
</content>
|
</content>
|
||||||
<orderEntry type="inheritedJdk" />
|
<orderEntry type="inheritedJdk" />
|
||||||
<orderEntry type="sourceFolder" forTests="false" />
|
<orderEntry type="sourceFolder" forTests="false" />
|
||||||
|
<orderEntry type="module" module-name="TOOLS" exported="" />
|
||||||
</component>
|
</component>
|
||||||
</module>
|
</module>
|
||||||
@@ -132,7 +132,7 @@ public class Board extends JPanel implements ActionListener {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
//check if computer needs to take a turn
|
//check if computer needs to take a turn
|
||||||
if (game.isTurnTaken() && game.emptyTiles() != 0){
|
if (game.isTurnTaken()){
|
||||||
game.setTurnTaken(false);
|
game.setTurnTaken(false);
|
||||||
game.computersTurn();
|
game.computersTurn();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -70,7 +70,7 @@ public class Game {
|
|||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int emptyTiles(){
|
public int emptyTiles(){
|
||||||
int n = 9;
|
int n = 9;
|
||||||
for (int i = 0; i < playfield.length; i++){
|
for (int i = 0; i < playfield.length; i++){
|
||||||
@@ -78,6 +78,7 @@ public class Game {
|
|||||||
n -= 1;
|
n -= 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
System.out.println(n);
|
||||||
return n;
|
return n;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,9 @@
|
|||||||
|
Variables:
|
||||||
|
player, board, search_depth
|
||||||
|
|
||||||
|
Data_structure:
|
||||||
|
BinaryTree
|
||||||
|
|
||||||
|
Loops:
|
||||||
|
recursion
|
||||||
|
for-loop
|
||||||
Reference in New Issue
Block a user