Learning Outcomes Core concepts practiced: Coding experience in language: Beginner.This is a challenging project for Java coders familiar with basic concepts, and is also great practice for AP Computer Science students. Dunno if int tickTackToeFields = else if ("no".contains(userChoiceString.Use a 2D array to make a Tic Tac Toe game - and practice using conditionals, loops, and functions! Mechanism to Fill array with numbers indicating each quadrant ToDo actually a decent bot not random generated winnerDecided is Variable to play game until a Winner is decided -> Methods : constructor, findMatchingItem(), printCurrentBoard(), This isn't really OOP and I should probably do that aswell later when I hope someone can take some time and analyze what I can do, to heavily improve. Then the bot does his turn by simply generating a random number which represents the quadrant and then there is the same check if it has been used already. It also checks whether that quadrant has already been used or if your input type is wrong. You have the first turn, you get the board printed with the respective quadrants and then you can choose into which quadrant you will place your X by typing in 1-9. Is that reasonable or like way to bad?įirst you get a menu, where you can chose what to do (I only coded 1 so far) so in this case you can play against a bot. This is basically my first somewhat bigger application. GUI is something I'll also do later on but I'd love to have the basics down first. This is also not Object Oriented since I didn't see a reason to do it that way although I will later on try it as well. Code is quite messy and if you don't have time to understand it, I wouldn't even bother in your place. I've recently started programming and been self-studying on various online courses + official documentation of oracle / java.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |