def nq_random_player(bot, state):
    """ Not-Quite-RandomPlayer that will move randomly but not stop or reverse. """
    legal_positions = bot.legal_positions[:]
    try:
        legal_positions.remove(bot.position)
    except ValueError:
        pass
    if len(legal_positions) > 1:
        if len(bot.track) >= 2:
            try:
                legal_positions.remove(bot.track[-2])
            except ValueError:
                pass
    if not legal_positions:
        return bot.position, state
    return bot.random.choice(legal_positions), state
