31 Aug 2023 - by 'Maurits van der Schee'
In my last post I've told you about how I'm writing (simple) games in TypeScript. In this post I'll share the source code of a Simple TicTacToe game I rewrote in TypeScript. I'm using Visual Studio Code and the TypeScript plugin. I'm working on Linux, but on Windows you should be able to use the same instructions within the WSL2 environment.
Type the following commands to get started:
git clone email@example.com:mevdschee/typescript-tictactoe.git
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.5/install.sh | bash
nvm install node
npm run dev
Now use Visual Studio Code (with the TypeScript extension) to edit the content and see how the code is recompiled and the browser is reloaded when the code is saved.
By implementing TicTacToe I tried to make a small starter project for your/my own games. By cloning this starter you should be able to create more complex games. Check out AceCardGames.com to get an idea of what you could be building and clone this project to get creative with your own ideas and designs.