Examples of BoardWrongWordPlace


Examples of pdp.scrabble.game.exception.BoardWrongWordPlace

      this.checkBoardRules();
      this.resetCheckedStates();
  }
  catch (BoardWrongWordPlace bwwp) {
      this.resetCheckedStates();
      throw new BoardWrongWordPlace(bwwp.getError(), bwwp.getInfo());
  }

  // Validate all new case and set their flag to old
  if (confirm) {
      for (int v = 0; v < VERT_DIM; v++) {
View Full Code Here

Examples of pdp.scrabble.game.exception.BoardWrongWordPlace

    if (this.isAI) {
        this.valide = false;
        return;
    }
    else {
        throw new BoardWrongWordPlace("Word must use center case !");
    }
      }
      else {
    this.centerUsed = true;
      }
View Full Code Here

Examples of pdp.scrabble.game.exception.BoardWrongWordPlace

      if (this.isAI) {
    this.valide = false;
    return false;
      }
      else {
    throw new BoardWrongWordPlace("Letters must be aligned !");
      }
  }

  // Test for just one letter
  if (newCasesNum == 1) {
View Full Code Here

Examples of pdp.scrabble.game.exception.BoardWrongWordPlace

        if (this.isAI) {
      this.valide = false;
      return;
        }
        else {
      throw new BoardWrongWordPlace(
      "Word letters must be verticaly unified !");
        }
    }
      }
  }
  else {
      axis = newCases.get(first).getV();
      firstP = newCases.get(first).getH();
      lastP = newCases.get(last).getH();

      for (int h = firstP; h <= lastP; h++) {
    if (this.getCase(axis, h).getState() == FREE) {
        if (this.isAI) {
      this.valide = false;
      return;
        }
        else {
      throw new BoardWrongWordPlace(
      "Word letters must be horizontaly unified !");
        }
    }
      }
  }
View Full Code Here

Examples of pdp.scrabble.game.exception.BoardWrongWordPlace

    if (this.isAI) {
        this.valide = false;
        return;
    }
    else {
        throw new BoardWrongWordPlace(
        "New word must be joined to an other one !");
    }
      }
  }
    }
View Full Code Here

Examples of pdp.scrabble.game.exception.BoardWrongWordPlace

      if (this.isAI) {
    this.valide = false;
    return;
      }
      else {
    throw new BoardWrongWordPlace(
      "This word doesn't exist:", " " + word);
      }
  }

  // If word exists, calculate points
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.