Frogger HTML5 JavaScript Canvas Game using Object Oriented Design

I created a Frogger game using JavaScript and HTML5. The game runs fine, but that might be because the complexity is so low. I’m looking for ways to improve the code. Some aspects of this game are still buggy, but I’m not concerned about that right now. I want to improve the current functionality first, … Read more

Rock, Paper, Scissors game made in python

I added Rock, Paper, Scissors to one of my programs. I’m new to python and PEP 8, so I want to see how to improve my work. def rock_paper_scissors(name): play_rps = True while play_rps: rps = [“rock”, ‘paper’, ‘scissors’] player_rps = input(“Rock, Paper, or Scissors: “).lower() com_rps = rps[random.randint(0,3)] print(com_rps) if com_rps == player_rps: print(‘Tie’) … Read more

FAMILY.PY | OOPython

Simple code where family and person instances can be created. There is a method where any instance of Person can be added to any instance of Family. class Family: def __init__(self): self.names, self.birthplaces, self.dobs, self.deaths = [], [], [], [] class Person: def __init__(self, name, birthplace, dob, death=None): self.name, self.birthplace, self.dob, self.death = name, birthplace, … Read more

Creating a maze game where the game resets if you hit traps/walls and finishes when you hit a different color

Here’s my code, the traps are the slightly visible squares. The user controls a red square (with arrow keys) and cannot touch the walls or traps or else the game resets. Additionally, if the user touches the green line, the game ends. Code: <!doctype html> <html> <head> <meta charset=”UTF-8″ /> <title>Maze Game</title> </head> <body> <header> … Read more