Quantcast
Channel: Programming Forums
Viewing all articles
Browse latest Browse all 51036

what do you guys think of my tic-tac-toe game?

$
0
0
I'm in the middle of learning Java right now and a project peaked my interests, so I attempted to do it. The project was a tic-tac-toe AI, but I'm not quite there so I created a tic-tac-toe game where the bot plays randomly, making it very easy :)

I was wondering how I did, what you would have done differently, and what I could improve on.

There are 4 files:


tictactoe.java: The main file that handles inputs, starts games, and so on
Spoiler


Game.java: Controls the game, checks for wins, makes the bot play, etc
Spoiler


Board.java: Used for storing the position of plays
Spoiler


AI.java: The bot. It accepts a Board object, finds an empty spot, and places an X there and returns the board.
Spoiler




Thanks you for your time

Viewing all articles
Browse latest Browse all 51036

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>