Tic Tac Toe
The project is designed to show that you can implement your own Kotlin-React projects using just with React tutorials.
Below you will find some useful information on how to work with this application.
This application all developed with the React Original Tutorial!
after setup your project should look like this:
tic-toc-toe/ README.md node_modules/ package.json .gitignore public/ favicon.ico index.html manifest.json src/ board/ Board.css Board.kt game/ Game.css Game.kt index/ index.css index.kt square/ Square.css Square.kt
For the project to build, these files must exist with exact filenames:
public/index.htmlis the page template;
You can delete or rename the other files.
You may create subdirectories inside
src. For faster rebuilds, only files inside
src are processed by Webpack.
You need to put any Kotlin and CSS files inside
src, or Webpack won’t see them.
Only files inside
public can be used from
You can, however, create more top-level directories.
They will not be included in the production build so you can use them for things like documentation.
Once the installation is done, you can run some commands inside the project folder:
npm start or
Runs the game in development mode.
Open http://localhost:3000 to view it in the browser.
The page will reload automatically when you make edits.
You will see build errors and lint warnings in the console.
npm run build or
Builds the game for production to the
It ensures that React is bundled in production mode and the build is optimized for best performance.
The build is minified and the filenames include hashes for cache management. Your game is ready to be deployed.
npm run eject
Note: this is a one-way operation. Once you
eject, you can’t go back!
If you aren’t satisfied with the build tool and configuration choices, you can
eject at any time. This command will remove the single build dependency from your project.
npm run eject copies all configuration files and transitive dependencies (webpack, Kotlin Compiler, etc) right into your project so you have full control over them. Commands like
npm start and
npm run build will still work, but they will point to the copied scripts so you can tweak them. At this point, you’re on your own.
Debugging the App
Start your game by running
npm start. Put the breakpoints in your Kotlin code.
Debug in Chrome from the list of run/debug configurations on the top-right and click the green debug icon or press
^D on macOS or
F9 on Windows and Linux to start debugging.
Currently, debugging is supported only in IntelliJ IDEA Ultimate 2017.3+
You can also debug your application using the developer tools in your browser.