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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
BIN
out/production/TOOLS/BinaryTree$Node.class
Normal file
BIN
out/production/TOOLS/BinaryTree$Node.class
Normal file
Binary file not shown.
BIN
out/production/TOOLS/BinaryTree.class
Normal file
BIN
out/production/TOOLS/BinaryTree.class
Normal file
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.
BIN
out/production/TicTacToe - MinMax/Minmax.class
Normal file
BIN
out/production/TicTacToe - MinMax/Minmax.class
Normal file
Binary file not shown.
BIN
out/production/TicTacToe - MinMax/Test.class
Normal file
BIN
out/production/TicTacToe - MinMax/Test.class
Normal file
Binary file not shown.
9
out/production/TicTacToe - MinMax/minmax_pseudo.txt
Normal file
9
out/production/TicTacToe - MinMax/minmax_pseudo.txt
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
Variables:
|
||||||
|
player, board, search_depth
|
||||||
|
|
||||||
|
Data_structure:
|
||||||
|
BinaryTree
|
||||||
|
|
||||||
|
Loops:
|
||||||
|
recursion
|
||||||
|
for-loop
|
||||||
Reference in New Issue
Block a user