public void move(Move m, int board)
	{
		int orig = (7-m.r0)*8 + (7-m.c0);
		long origMask = ~(1L << orig);
		int dest = (7-m.rf)*8 + (7-m.cf);
		long destMask = ~(1L << dest);
		int otherboard = 0;
		if (board == 0)
			otherboard = 1;

		if ((m_boards[board].getPawns() & (1L << orig)) != 0)
		{
			m_boards[board].setPawns(m_boards[board].getPawns() & origMask & ~(1L << dest)); //PxP now can't have pawn still exist on dest
			m_boards[otherboard].setPawns(m_boards[otherboard].getPawns() | (1L << dest));
			m_boards[board].setKnights(m_boards[board].getKnights() & ~(1L << dest));
			m_boards[board].setBishops(m_boards[board].getBishops() & ~(1L << dest));
			m_boards[board].setRooks(m_boards[board].getRooks() & ~(1L << dest));
			m_boards[board].setQueens(m_boards[board].getQueens() & ~(1L << dest));
			//no king because it shouldn't be able to be captured
		}
		else if ((m_boards[board].getKnights() & (1L << orig)) != 0)
		{
			m_boards[board].setKnights(m_boards[board].getKnights() & origMask & ~(1L << dest));
			m_boards[otherboard].setKnights(m_boards[otherboard].getKnights() | (1L << dest));
			m_boards[board].setPawns(m_boards[board].getPawns() & ~(1L << dest));
			m_boards[board].setBishops(m_boards[board].getBishops() & ~(1L << dest));
			m_boards[board].setRooks(m_boards[board].getRooks() & ~(1L << dest));
			m_boards[board].setQueens(m_boards[board].getQueens() & ~(1L << dest));
			//no king because it shouldn't be able to be captured
		}
		else if ((m_boards[board].getBishops() & (1L << orig)) != 0)
		{
			m_boards[board].setBishops(m_boards[board].getBishops() & origMask & ~(1L << dest));
			m_boards[otherboard].setBishops(m_boards[otherboard].getBishops() | (1L << dest));
			m_boards[board].setPawns(m_boards[board].getPawns() & ~(1L << dest));
			m_boards[board].setKnights(m_boards[board].getKnights() & ~(1L << dest));
			m_boards[board].setRooks(m_boards[board].getRooks() & ~(1L << dest));
			m_boards[board].setQueens(m_boards[board].getQueens() & ~(1L << dest));
			//no king because it shouldn't be able to be captured
		}
		else if ((m_boards[board].getRooks() & (1L << orig)) != 0)
		{
			m_boards[board].setRooks(m_boards[board].getRooks() & origMask & ~(1L << dest));
			m_boards[otherboard].setRooks(m_boards[otherboard].getRooks() | (1L << dest));
			m_boards[board].setPawns(m_boards[board].getPawns() & ~(1L << dest));
			m_boards[board].setKnights(m_boards[board].getKnights() & ~(1L << dest));
			m_boards[board].setBishops(m_boards[board].getBishops() & ~(1L << dest));
			m_boards[board].setQueens(m_boards[board].getQueens() & ~(1L << dest));
			//no king because it shouldn't be able to be captured
		}
		else if ((m_boards[board].getQueens() & (1L << orig)) != 0)
		{
			m_boards[board].setQueens(m_boards[board].getQueens() & origMask & ~(1L << dest));
			m_boards[otherboard].setQueens(m_boards[otherboard].getQueens() | (1L << dest));
			m_boards[board].setPawns(m_boards[board].getPawns() & ~(1L << dest));
			m_boards[board].setKnights(m_boards[board].getKnights() & ~(1L << dest));
			m_boards[board].setBishops(m_boards[board].getBishops() & ~(1L << dest));
			m_boards[board].setRooks(m_boards[board].getRooks() & ~(1L << dest));
			//no king because it shouldn't be able to be captured
		}
		else if ((m_boards[board].getKings() & (1L << orig)) != 0)
		{
			m_boards[board].setKings(m_boards[board].getKings() & origMask & ~(1L << dest));
			m_boards[otherboard].setKings(m_boards[otherboard].getKings() | (1L << dest));
			m_boards[board].setPawns(m_boards[board].getPawns() & ~(1L << dest));
			m_boards[board].setKnights(m_boards[board].getKnights() & ~(1L << dest));
			m_boards[board].setBishops(m_boards[board].getBishops() & ~(1L << dest));
			m_boards[board].setRooks(m_boards[board].getRooks() & ~(1L << dest));
			m_boards[board].setQueens(m_boards[board].getQueens() & ~(1L << dest));
		}
		else
			return; //not a valid move (no piece selected)

		if (m_turn == Definitions.Color.WHITE)
		{
			m_boards[board].setWhite(m_boards[board].getWhite() & origMask);
			m_boards[board].setBlack(m_boards[board].getBlack() & destMask);
			m_boards[otherboard].setWhite(m_boards[otherboard].getWhite() | (1L << dest));
		}
		else
		{
			m_boards[board].setBlack(m_boards[board].getBlack() & origMask);
			m_boards[board].setWhite(m_boards[board].getWhite() & destMask);
			m_boards[otherboard].setBlack(m_boards[otherboard].getBlack() | (1L << dest));
		}		
		m_turn = Definitions.flip(m_turn);
	}