Multicore

PasswordBot

Oct 17th, 2020
460
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.41 KB | None | 0 0
  1. class PasswordBot:
  2.     def __init__(self, round=0):
  3.         self.turn = 0
  4.         self.nice = True
  5.     def move(self, previous=None):
  6.         self.turn+=1
  7.         if self.turn <= 3 and previous == 3:
  8.             self.nice = False
  9.         if self.turn >= 3 and self.nice:
  10.             if self.nice:
  11.                 return 2
  12.             else:
  13.                 return previous
  14.         else:
  15.             return 3
Advertisement
Add Comment
Please, Sign In to add comment