- Objective - To extend a preexisting arcade with built-in infrastructure.
- Purpose - To gain familiarity the following features:
- Generics
- Design Patterns
- Tip - All modifications should take place in children of package named
arcade.game
.
- Ensure that all test cases in
com.github.curriculeon
pass with 100% success rate.
- Create tests for at least 5 of the methods of the classes in
arcade.game.cardgame.highlow
. - Ensure that all test cases in
com.github.curriculeon
pass with 100% success rate.
- Implement
Blackjack
mimicking the same package and class structures ofarcade.game.cardgame.highlow
. - Create tests for at least 10 methods of the classes in
arcade.game.cardgame.blackjack
- Ensure that all test cases in
com.github.curriculeon
pass with 100% success rate.
- Implement
HighLow
usingDice
objects in a package namedarcade.game.dicegame.highlow
. - Create tests for at least 10 methods of the classes in
arcade.game.dicegame.highlow
. - Ensure that all test cases in
com.github.curriculeon
pass with 100% success rate.
- The following documentation may be slightly stale.
- Description:
Profile
stores a arcade-visitor'sid
,name
, andbalance
.
- Description:
PlayerInterface
is a contract to ensure that all players have reference to aprofile
.
- Description:
- Represents a player within the context of a game.
- should cease to exist upon termination of a game.
Player
should implementPlayerInterface
Player
objects should be created within the scope of a game.
- Description:
- Represents a game which handles some type of player.
- should be parameterized with a generic type whose upper bound is
PlayerInterface
.- e.g. -
SomePlayerType
is a subclass ofPlayerInterface
. - This restricts the types of players this game can interact with.
- e.g. -
GameInterface
should declare each of the following methods:TypeOfPlayer[] getPlayers()
TypeOfPlayer getPlayer(Long playerId)
void addPlayer(TypeOfPlayer player)
void removePlayer(TypeOfPlayer player)
Boolean contains(TypeOfPlayer player)
-
Description:
GameEngineInterface
is a contract which ensures a specific type ofGameEngine
operates on a specific type ofPlayer
and a specific type ofGame
-
should be parameterized with two generic types
GameTypePlayer
a sub class ofPlayerInterface
GameType
a sub class ofGameInterface<GameTypePlayer>
-
should declare three method signatures
GameType getGame()
- return the composite Game object to the client.
void evaluateTurn(GameTypePlayer player)
- evaluate the turn of a player,
void run()
- begin game
- Description
GameEngine
ensures all sub-classes provide aGame
object upon instantiation.
- should be parameterized with two generic types
GameTypePlayer
a sub class ofPlayerInterface
GameType
a sub class ofGameInterface<GameTypePlayer>
- should implement a
GameEngineInterface<GameType, GameTypePlayer>
- should defer the definition of
evaluateTurn
andrun
to sub-classes.
- To fork the project, click the
Fork
button located at the top right of the project.
- Navigate to your github profile to find the newly forked repository.
- Copy the URL of the project to the clipboard.
- Clone the repository from your account into the
~/dev
directory.- if you do not have a
~/dev
directory, make one by executing the following command:mkdir ~/dev
- navigate to the
~/dev
directory by executing the following command:cd ~/dev
- clone the project by executing the following command:
git clone https://github.com/MYUSERNAME/NAMEOFPROJECT
- if you do not have a
- Ensure that the tests run upon opening the project.
- You should see
Tests Failed: 99 of 99 tests
- You should see
- from a terminal navigate to the root directory of the cloned project.
- from the root directory of the project, execute the following commands:
- add all changes
git add .
- commit changes to be pushed
git commit -m 'I have added changes'
- push changes to your repository
git push -u origin master
- add all changes
- from the browser, navigate to the forked project from your github account.
- click the
Pull Requests
tab. - select
New Pull Request