Skip to content

mrowan137/connect-k

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Connect-k

Flask-based Python web-game, hosted with Google App Engine, called Connect-k: a 2-player game where players take turns placing pieces onto the bottom row of an infinite grid. The game ends if a player's pieces form a contiguous line (horizontal or vertical) of length k. Try it out here.

Description

Supported gameplay options:

  • Value of k: length of the line required to win
  • Player color: red or blue
  • Player to go first: red or blue
  • Opponent: computer (easy), computer (hard), human

Dependencies

Help

  • If multiple web browser tabs are open and identified as belonging to the same user, be aware that it modifies the same game data; opening, for example, another tab in the same web browser could be identified as belonging to the same user. On the other hand, accessing another game session from a new 'incognito' window could be identified as belonging to a separate user and would generate separate game data.

Useful Google Cloud App Engine commands

This application is hosted using Google App Engine (there are great tutorials for how to deploy a Flask app using App Engine, e.g. this tutorial). When working with the App Engine platform, the following are some useful gcloud commands:

  • Deploy changes to the Google App Engine server: gcloud app deploy.
  • Open the most recent app version in a web browser: gcloud app browse.
  • List all versions deployed to App Engine server: gcloud app versions list.
  • There's a limit to how many versions of the app you can store on App Engine; if you have too many you will not be able to upload more unless deleting some old ones. There is a useful script here that can remove all but the n most recent versions. With n=2, it could be called like this to delete all but the 2 most recent versions: sh delete-older-gcloud-app-versions.sh default 2. After doing this, you can deploy the most recent version of the app.

Author

Michael E. Rowan — mrowan137[email protected].

License

MIT License.

References