Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Hand {
- int currentMove;
- // 0 rock, 1 scissors, 2 paper
- public void setMove(int currentMove) {
- this.currentMove = currentMove;
- }
- public void printCurrentMove() {
- System.out.println(currentMove);
- }
- }
- public class Program {
- public static void main(String args[]) {
- Hand alex = new Hand();
- Hand jared = new Hand();
- alex.setMove(0);
- alex.printCurrentMove();
- jared.setMove(2);
- jared.printCurrentMove();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement