/Whitespace-Knots-N-Crosses

A Whitespace Language Proof of concept, a classic two-player Knots n' Crosses experience

Primary LanguageWitcher ScriptGNU General Public License v3.0GPL-3.0

Whitespace-Knots-N-Crosses

Contributors Forks Stars Licence Issues

This is a Proof of Concept recreation of Knots N' Cross

Description

In the modern world, Game Developement is dominated by big name languages such as C++ and Java, this project challenges that aproach. Instead, pushing that Game Dev can be done using any language, even esoterics like Whitespace, with equal success to the big name languages that the industry pushes. This game was written in Whitespace Assembly and assembled to pure Whitespace, it was made over a span of 2 days, and has memory management, error checking, and protection against overflow attacks. As is made appearent, it is a recreation of the classic pen and paper game, Tic-Tac-Toe, (also called Knots and Crosses).

Example of X winning a game

Instructions

We will be running this game using vii5ard's online compiler, which can be found here, though any whitespace compiler will work.

Running the game

  • Clone this repository
  • Using a webbrowser, launch the Whitelips Compiler
  • Using Whitelips, create a new file with the ".ws" extention (without the quotes)
  • Go to the clone you made back in step 1, and open the file named "knots_and_crosses.ws" in notepad
  • The file should appear to be hundreds of blank lines, if you see letters, then you opened the wrong file, We are looking for the ".ws" file
  • press keys Ctrl+A to select everthing in the file (Command+A for Mac users)
  • Copy the text you selected in the last step
  • Now, go back over to Whitelips and Paste the text into the file you created back in step 3.
  • Press the button labeled "Run" in the compiler
  • And follow the dirrections given by the program

Playing the game

  • as soon as the program is ran, the terminal should prompt you to select if you want "X" or "O" to have the first turn. enter the LOWERCASE letter 'x' or 'o' and press enter
  • the board should be printed to the screen, showing each cell empty. you will also be prompted to make the first move, to select the location youd like to mark, we use Chess like notation. For example, entering C1 will mark the top right corner of the board, while A3 will mark the bottom left.
  • after the game is over, the system will prompt you asking if youd like to play again, to play again simply enter a lowercase 'y' and to decline send a lowercase 'n'. If you selected to play again, you will be sent back to the start of the game (please refer back to step one). otherwise, if you declined the invitation to play again, the program is over and will exit.

Credits

This project wouldnt of been made possible without the works of vii5ard and their compiler, big thanks to them for streamlining the coding process and therefore allowing me to get this up and running in only 2 days!!

Examples

please note that i was using an external software to force darkmode to my webpages.

Example of X winning a game

Program in use