Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Matt Tower
205_hw02
Commits
4b6287d2
Commit
4b6287d2
authored
Nov 11, 2014
by
Matt Tower
Browse files
Started players
parent
70b187ae
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/model/player/AIPlayer.java
0 → 100644
View file @
4b6287d2
/**
* CSCI 205 - Software Design and Engineering
* Name(s): Matt Tower
*
* Work: hw02
* Created: Nov 11, 2014, 5:55:20 PM
*/
package
model.player
;
import
model.Board
;
import
model.Mark
;
/**
* @author mjt023
*
*/
public
class
AIPlayer
extends
Player
{
/**
* @param theBoard
* @param myMark
*/
public
AIPlayer
(
Board
theBoard
,
Mark
myMark
)
{
super
(
theBoard
,
myMark
);
// TODO Auto-generated constructor stub
}
}
src/model/player/BlockerPlayer.java
0 → 100644
View file @
4b6287d2
/**
* CSCI 205 - Software Design and Engineering
* Name(s): Matt Tower
*
* Work: hw02
* Created: Nov 11, 2014, 5:55:06 PM
*/
package
model.player
;
/**
* @author mjt023
*
*/
public
class
BlockerPlayer
{
}
src/model/player/RandomPlayer.java
0 → 100644
View file @
4b6287d2
/**
* CSCI 205 - Software Design and Engineering
* Name(s): Matt Tower
*
* Work: hw02
* Created: Nov 11, 2014, 5:54:54 PM
*/
package
model.player
;
import
java.util.Random
;
import
model.Board
;
import
model.Mark
;
/**
* @author mjt023
*
*/
public
class
RandomPlayer
extends
Player
{
private
Board
theBoard
;
private
Mark
myMark
;
private
Random
rand
=
new
Random
();
/**
* @param theBoard
* @param myMark
*/
public
RandomPlayer
(
Board
theBoard
,
Mark
myMark
)
{
super
(
theBoard
,
myMark
);
}
/**
* generates a random number within board dimensions, used for choosing
* random coordinates
*
* @return - randomly generated number within board dimensions
*/
public
int
genRandNum
()
{
return
this
.
rand
.
nextInt
(
3
);
}
/**
* AI makes random moves until an empty space is found
*
* @return
*/
public
boolean
setMark
()
{
}
}
Write
Preview
Supports
Markdown
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