Skip to content

Instantly share code, notes, and snippets.

View Pharaoh00's full-sized avatar

Pharaoh Pharaoh00

  • Belo Horizonte - MG - Brasil
View GitHub Profile
def beats(one, two):
result = False
# Only two outcome can occur
# If you Win = True
# If you Lose = False
# This is the boolean logic (George Boole created this on 1854)
# BEFORE all the computer stuff. Cool right?
if one is two:
class Player:
def __init__(self, x, y): # This is the initiation for the class Player
self.x = x
self.y = y
def returnX(self):
return self.x
def returnY(self):
return self.y
import random
"""This program plays a game of Rock, Paper, Scissors between two Players,
and reports both Player's scores each round."""
moves = ['rock', 'paper', 'scissors']
"""The Player class is the parent class for all of the Players
in this game"""
import random
moves = ["rock", "paper", "scissors"]
class Player:
self.move = "something"
self.move2 = "something"
def learn(self, my_move, their_move):