Examples of switchLetters()


Examples of pdp.scrabble.game.Player.switchLetters()

    public void switchLettersTester() {
  Player player = FACTORY.createPlayer(GAME, "test", 0, false, null);
  System.out.println("Before: " + player.getRackLettersName());

  try {
      player.switchLetters(0, 1);
      System.out.println("Normal switch (0, 1): " + player.getRackLettersName());
  }
  catch (ArrayIndexOutOfBoundsException e) {
      fail("ArrayIndexOutOfBoundsException was not expected");
  }
View Full Code Here

Examples of pdp.scrabble.game.Player.switchLetters()

  catch (ArrayIndexOutOfBoundsException e) {
      fail("ArrayIndexOutOfBoundsException was not expected");
  }

  try {
      player.switchLetters(-1, 0);
      fail("ArrayIndexOutOfBoundsException was expected");
  }
  catch (ArrayIndexOutOfBoundsException e) {
      System.out.println("Can't switch (-1, 0)");
  }
View Full Code Here

Examples of pdp.scrabble.game.Player.switchLetters()

  catch (ArrayIndexOutOfBoundsException e) {
      System.out.println("Can't switch (-1, 0)");
  }

  try {
      player.switchLetters(-1, -2);
      fail("ArrayIndexOutOfBoundsException was expected");
  }
  catch (ArrayIndexOutOfBoundsException e) {
      System.out.println("Can't switch (-1, -2)");
  }
View Full Code Here

Examples of pdp.scrabble.game.Player.switchLetters()

  catch (ArrayIndexOutOfBoundsException e) {
      System.out.println("Can't switch (-1, -2)");
  }

  try {
      player.switchLetters(2, 2);
      System.out.println("Switch same letters (2, 2): " + player.getRackLettersName());
  }
  catch (ArrayIndexOutOfBoundsException e) {
      fail("ArrayIndexOutOfBoundsException was not expected");
  }
View Full Code Here

Examples of pdp.scrabble.game.Player.switchLetters()

  catch (ArrayIndexOutOfBoundsException e) {
      fail("ArrayIndexOutOfBoundsException was not expected");
  }

  try {
      player.switchLetters(3, 7);
      fail("ArrayIndexOutOfBoundsException was expected");
  }
  catch (ArrayIndexOutOfBoundsException e) {
      System.out.println("Can't switch (3, 7)");
  }
View Full Code Here

Examples of pdp.scrabble.game.Player.switchLetters()

  catch (ArrayIndexOutOfBoundsException e) {
      System.out.println("Can't switch (3, 7)");
  }

  try {
      player.switchLetters(-7, 7);
      fail("ArrayIndexOutOfBoundsException was expected");
  }
  catch (ArrayIndexOutOfBoundsException e) {
      System.out.println("Can't switch (-1, 2)");
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.