Two Player Game - Java Pt. 5

Chris Chen
/*
* Purpose: To create a two player game interface which can be implemented in any two player game
*/

public interface TwoPlayerGame {

public void displayRules(); //displays the rules
public void promptUser(); //prompts the user
public String inputMove(); //receives input from the user
public boolean isValid(String input); //checks if input is legal
public boolean determineWinner(); //checks if the game is over and displays the winner
public void move(String move); //executes move

}//end TwoPlayerGame

Published by Chris Chen

Chris is currently attending the University of California, Berkeley seeking an undergraduate's degree in Electrical Engineering Computer Science. He enjoys playing basketball, practicing kendo, hanging out w...  View profile

To comment, please sign in to your Yahoo! account, or sign up for a new account.