Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 2e18c82f33
Fetching contributors…

Cannot retrieve contributors at this time

executable file 20 lines (14 sloc) 0.465 kb
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from rock_paper_scissors import Player
class JEGQueuePlayer(Player):
QUEUE = ['rock', 'scissors', 'scissors']
def __init__(self, opponent_name):
super(self.__class__, self).__init__(opponent_name)
self.index = 0
def choose(self):
choice = self.QUEUE[self.index]
self.index += 1
if self.index == len(self.QUEUE):
self.index = 0
return choice
Jump to Line
Something went wrong with that request. Please try again.