@Override
	public MoveResult makeMove(HantoPieceType pieceType, HantoCoordinate from,
			HantoCoordinate to) throws HantoException, HantoPrematureResignationException {
		
		if(gameIsOver) {
			throw new HantoException("game is already over");
		}
		
		MoveResult result = checkresign(pieceType, from, to);
		
		if(pieceType == null && from == null && to == null) {
			if(turn.equals(HantoPlayerColor.BLUE)) {
				result = MoveResult.RED_WINS;
			}
			else {
				result = MoveResult.BLUE_WINS;
			}
			gameIsOver = true;
		}
		
		if(result.equals(MoveResult.OK)) {
			// will throw an exception if there is a problem
			ismovelegal(pieceType, from, to);

			// makes the move
			move(pieceType, from, to);

			// end the turn
			turncount++;
			if(turn.equals(HantoPlayerColor.BLUE)) {
				turn = HantoPlayerColor.RED;
			}
			else {
				turn = HantoPlayerColor.BLUE;
			}

			// check for game over situation
			result = checkGameOver();
		}
		
		return result;
	}