catsuko / connectfour Goto Github PK
View Code? Open in Web Editor NEWWrite your own strategy and versus other players in a game of ConnectFour
Write your own strategy and versus other players in a game of ConnectFour
When the game view displays press any key to continue, the game just hangs and you must exit manually. Related to having 2 windows open maybe?
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?
This causes bugs for strategies that rely on internal state to track certain things. Could the strategy loader create new instances as they are accessed?
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!
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.
Is a problem when strategies contain saved variables
An error should be thrown that will eventually be caught and used to auto lose the game for the player that made the mistake.
Players are put into a bracket where after each match, the winner progresses to the next round.
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.
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.
Unsure what the solution is, maybe we track W-D-L instead of just W in a tournament?
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"
Easy PR for your quota, give a cool name to SherryStrategy!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.