Code Monkey home page Code Monkey logo

connectfour's People

Contributors

caroevans avatar catsuko avatar mikepepping avatar shewwiii avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

connectfour's Issues

Draws & Best of (n) Games

How should draws be handled in a best of 3? It counts as noones win and just takes the total game count down by 1?

Select strategies from command line when running a single match

I'd like to be able to do:

python connect_four_match CrossStrategy StdInStrategy

and have the match ran with those strategies. There should also be strategy defaults for when no strategies or only a single strategy is provided. So these are still valid:

python connect_four_match CrossStrategy
python connect_four_match

Then we won't need to keep changing code just to test new strategies!

Handle Draw Results

I assume at the moment, the board will become full and then the next player to place a token will lose due to a TokenPlacementError. We need to handle draws in a way that is meaningful to collaborators, e.g. a tournament should be able to read a draw result and distinguish it from a win\loss.

Elimination Tournament

Players are put into a bracket where after each match, the winner progresses to the next round.

Update README with instructions of playing a single game

Currently the script that the README tells the reader to run, will launch a tournament which will be confusing for first time users or inconvenient for people trying to test. Update it to mention using the connect four match script instead.

BestOf Game Decorator

I would like a Decorator object that could wrap a Game and then have it play as a Best Of (n) match, explained here.

who goes first and who goes second should be alternated after each game. For example: In a best of 2, each player would get to go first once.

It might also be a good idea into reworking the output of ConnectFourGame so BestOfGame can match. The result of both concepts is still an ordering of two players with a draw being a possible outcome.

Error handling during turns

When an error occurs during a player's turn, the game should catch the error and then declare the other player the winner.

Bonus points for printing the reason a player won onto the game view:
"Player 1 won, they connected four!"
"Player 1 won, player 2 tried to place their token out of bounds"
"Player 1 won, player 2 tried to place their token in a full column"

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.