Coder Social home page Coder Social logo

python-games's Introduction

Contributors Forks Issues MIT License Mastodon

Python Games

Collection of some starter python game projects for beginners

How to play these games

  1. Clone this repository
git clone https://github.com/wiseweb-works/python-games.git
cd python-games
  1. Install requirements (if has)
pip install -r requirements.txt
  1. Start Game
python3 game-name.py

Dependencies

Package        Version
-------------- ---------
pip            X
setuptools     X

About Games

There are a total of 3 games in this repository, all of them are beginner lever that will help you practice your python basics like loops, if-else, function, recursion, list comprehension, random module, time module, and much more.

1. Nim Game

Nim is a mathematical game of strategy in which two players take turns removing (or "nimming") sticks from distinct piles. On each turn, a player must remove at least one stick, and may remove maximum of three sticks. Depending on the version being played, the goal of the game is either to avoid taking the last object or to take the last object.

2. Tic-Tac-Toe Game

Tic-tac-toe, noughts and crosses, or Xs and Os is a paper-and-pencil game for two players who take turns marking the spaces in a three-by-three grid with X or O. The player who succeeds in placing three of their marks in a horizontal, vertical, or diagonal row is the winner. It is a solved game, with a forced draw assuming best play from both players.

2. Connect4 Game

The Connect 4 game is a classic strategy game in which 2 players go head-to-head in a battle to own the grid!

Players choose blue or red discs. They drop the discs into the grid, starting in the middle or at the edge to stack their colored discs upwards, horizontally, or diagonally. Use strategy to block opponents while aiming to be the first player to get 4 in a row to win. The Connect 4 game is a great choice for a play date, a rainy day activity, or anytime your kids want a fun game to play with a friend. It's fun to go 4 the win!

Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!

  1. Fork the Project
  2. Create your Branch (git checkout -b game/yourname)
  3. Commit your Changes (git commit -m 'Your comment')
  4. Push to the Branch (git push origin game/yourname)
  5. Open a Pull Request

License

Distributed under the MIT License. See LICENSE for more information.

Contact

Wise - @wise - [email protected]

Project Link: https://github.com/wiseweb-works/python-games

python-games's People

Contributors

wiseweb-works avatar

Watchers

 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.