Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
2
205_hw02
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Stefano Cobelli
205_hw02
Commits
b304cb03
Commit
b304cb03
authored
Nov 11, 2014
by
Matt Tower
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'MattsBranch' of git@gitlab.bucknell.edu:sjc032/205_hw02.git into MattsBranch
parents
67f226a4
5acf8a1f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
2 deletions
+27
-2
src/model/player/AIPlayer.java
src/model/player/AIPlayer.java
+27
-2
No files found.
src/model/player/AIPlayer.java
View file @
b304cb03
...
@@ -7,6 +7,9 @@
...
@@ -7,6 +7,9 @@
*/
*/
package
model
.
player
;
package
model
.
player
;
import
java.util.ArrayList
;
import
java.util.Hashtable
;
import
model.Board
;
import
model.Board
;
import
model.Mark
;
import
model.Mark
;
...
@@ -14,7 +17,10 @@ import model.Mark;
...
@@ -14,7 +17,10 @@ import model.Mark;
* @author mjt023
* @author mjt023
*
*
*/
*/
public
class
AIPlayer
extends
Player
{
public
class
AIPlayer
extends
Player
implements
AutoPlayable
{
private
Hashtable
<
Mark
[][],
Boolean
>
hashBoards
=
new
Hashtable
<
Mark
[][],
Boolean
>();
private
ArrayList
<
Mark
[][]>
boardStreak
=
new
ArrayList
<
Mark
[][]>();
/**
/**
* @param theBoard
* @param theBoard
...
@@ -22,7 +28,26 @@ public class AIPlayer extends Player {
...
@@ -22,7 +28,26 @@ public class AIPlayer extends Player {
*/
*/
public
AIPlayer
(
Board
theBoard
,
Mark
myMark
)
{
public
AIPlayer
(
Board
theBoard
,
Mark
myMark
)
{
super
(
theBoard
,
myMark
);
super
(
theBoard
,
myMark
);
// TODO Auto-generated constructor stub
}
}
/*
* (non-Javadoc)
*
* @see model.player.AutoPlayable#decideMove()
*/
@Override
public
boolean
decideMove
()
{
return
false
;
}
public
Mark
[][]
turnBoard
(
Mark
[][]
boardToTurn
)
{
return
boardToTurn
;
}
public
Mark
[][]
flipBoard
(
Mark
[][]
boardToFlip
)
{
return
boardToFlip
;
}
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment