public ChessMove[] getMoves(int n) {
		// get size of array
		int size = 0;
		if (n == 0 || Math.abs(n) > log.size()) {
			size = log.size();
		} else {
			size = Math.abs(n);
		}

		ChessMove[] moves = new ChessMove[size];
		if (n > 0 && Math.abs(n) < log.size()) {
			for (int i = 0; i < n; i++) {
				moves[i] = log.get(i);
			}
		} else if (n < 0 && Math.abs(n) < log.size()) {
			for (int i = 0; i < -n; i++) {
				moves[i] = log.get(log.size() + n + i);
			}
		} else {
			log.toArray(moves);
		}
		return moves;
	}