Git Product home page Git Product logo

u4_hw_python_smash_bros's Introduction

Python Smash Brothers


Overview

Have you ever wondered what happens behind the scenes with Smash Brothers? In this lab, we'll be building a simplified version of the game to get practice with Python OOP by building classes for characters and battles! While there are minimum requirements, you're more than welcome to make this as accurate as possible post MVP!

Getting Started

  • Fork and clone this repository

Instructions

Data

We'll be working with the data found in characters.json. This data should be imported into our smash.py file and used to populate instances of our Character class.

Classes

We'll be creating two classes in the smash.py file with the following specifications:

  • Create a Battle and Character class in the smash.py file.
  • The Character class should have at least a character's name, health, and list of their moves
  • It should also be able to decrement character's health and select a random attack from their list of moves
  • The Battle class should take in two Characters to start a battle

Game

In the main.py file we'll import our classes and use them within a game function. The game function should do the following:

  • Allow users to select a character from the terminal when the game starts: input() may be useful here
  • Determine a winner if a Character has health less than zero
  • If the user does not select a Character, a random one is chosen for them
  • Opponents should be chosen at random

Requirements

  • The battle class should accept two characters to start the battle
  • The character class should create a character using a minimum of their name and a list of attacks
  • In the character class, you should be able to decrement the characters health and select a random attack from the list.
  • The game should run from the main.py file.
  • Be able to choose a character in the terminal, hint: input may be useful.
  • Should declare a winner based on who has the highest remaining health.
  • If the user does not select a character, a random one should be chosen for them.
  • The opponent should be chosen at random, hint: random.choice may be useful.

Bonus

  • Try to make a game that allows for restarts after a player wins and keeps track of total score.

Resources

u4_hw_python_smash_bros's People

Contributors

ahonore42 avatar anpato avatar tylusdawkins avatar gonczarm avatar nobodyslackey avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.