Vita_Harvey

getTurns(DataInputStream dis)

Mar 2nd, 2019
51
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.52 KB | None | 0 0
  1. /**
  2.    * A method for getting the total number of turns played
  3.    * in a given TTT game from the input file.
  4.    * @param DataInputStream dis, the current DIS being used
  5.    * @return int turns, the total number of turns played.
  6.    */
  7.    public int getTurns(DataInputStream dis) {
  8.       dis = this.dis;
  9.       try{
  10.          dis.readChar();
  11.          turns++;    
  12.       } catch (IOException e) {
  13.             System.out.println("Nothing to read here, folks, move along.");
  14.       }              
  15.       return turns;
  16.    }
Add Comment
Please, Sign In to add comment