public void updateBoard(GameBoard board)
	{
		for (Position position : Position.all())
		{
			PieceButton button = buttons[position.getColumn()][position.getRow()];
			Piece piece = board.getPiece(position);
			if (button.getPiece() != piece) {
				button.setPiece(piece, !firstUpdate);
			} else if (piece != null && piece.getType() == Piece.KING && board.isCheck(piece.getColor())) {
				button.setPieceCheck(piece);
			} else {
				button.setPiece(piece);
			}
		}
		if (firstUpdate) {
			firstUpdate = false;
		}
		repaint();
	}