Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Apr 5th, 2013  |  syntax: Java  |  size: 2.15 KB  |  views: 72  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. package uk.ac.sheffield.com1003.kalah;
  2.  
  3. public class MyKalahGameState extends KalahGameState {
  4.  
  5.         @Override
  6.         public void startGame(Player playerA, Player playerB, int startingStones)
  7.                         throws InvalidStartingStonesException {
  8.                 // TODO Auto-generated method stub
  9.                
  10.         }
  11.  
  12.         @Override
  13.         public Player getPlayerA() {
  14.                 // TODO Auto-generated method stub
  15.                 Player playerA = playerA.getName();
  16.                 return playerA;
  17.         }
  18.  
  19.         @Override
  20.         public Player getPlayerB() {
  21.                 // TODO Auto-generated method stub
  22.                 Player playerB = playerB.getName();
  23.                 return playerB;
  24.         }
  25.  
  26.         @Override
  27.         public Player getTurn() {
  28.                 // TODO Auto-generated method stub
  29.                 boolean isFirst = true;
  30.             Player playerA;
  31.                 Player playerB;
  32.                 getTurn(){
  33.                 if(isFirst){
  34.                     playerA.getTurn();
  35.                 } else {
  36.                     playerB.getTurn();
  37.  
  38.                 isFirst = !isFirst;
  39.                 }
  40.             }
  41.         }
  42.  
  43.         @Override
  44.         public int getKalah(Player player) {
  45.                 return 0;
  46.                 // TODO Auto-generated method stub
  47.         }
  48.  
  49.         @Override
  50.         public int getNumStones(int sidePitNum)
  51.                         throws IllegalSidePitNumberException {
  52.                 // TODO Auto-generated method stub
  53.                 return 0;
  54.         }
  55.  
  56.         @Override
  57.         public int getNumStones(Player player, int sidePitNum)
  58.                         throws IllegalSidePitNumberException {
  59.                 // TODO Auto-generated method stub
  60.                 return 0;
  61.         }
  62.  
  63.         @Override
  64.         public int getScore(Player player) {
  65.                 // TODO Auto-generated method stub
  66.                 /* get the players kalah which is the number of stones in their side pit */
  67.                 return 0;
  68.         }
  69.  
  70.         @Override
  71.         public void makeMove(int sidePitNum) throws IllegalSidePitNumberException,
  72.                         EmptySidePitException {
  73.                 // TODO Auto-generated method stub
  74.                 /* need to choose a pit and then move the stones to the other pits accordingly */
  75.                
  76.         }
  77.  
  78.         @Override
  79.         public boolean isGameOver() {
  80.                 // TODO Auto-generated method stub
  81.                 /* if player a or b's pits are empty then the game is over */
  82.                 return false;
  83.         }
  84.  
  85.         @Override
  86.         public Player getWinner() {
  87.                 /* which players pits are empty then that player has won */
  88.                 // TODO Auto-generated method stub
  89.                 return null;
  90.         }
  91.  
  92.         @Override
  93.         public KalahGameState copy() {
  94.                 // TODO Auto-generated method stub
  95.                 return null;
  96.         }
  97.        
  98. }
clone this paste RAW Paste Data