GithubHelp home page GithubHelp logo

tictactoe's Introduction

TicTacToe

I built the logic of my tic tac toe game in VS Code and I built the GUI in intellij using swing.

Reflection

Introduction/Purpose:

The purpose of this program was to challenge myself and diversify my programming knowledge. I believe that I am comfotable coding logic, however, I did not know how to code any graphics which interested me. I began watching a tutorial to teach myself how to program a GUI.

Problems I ran into (for logic):

I ran into many problems while creating the logic section of my tic tac toe game. The first problem I ran into was setting up the board. I had the idea to create a char array in order to do so and then pull each element from the array and print it in a loop. The next issue I had was printing out the moves that each player makes. I realized that if I created if statements for each move that could be made then I could create a similar for loop as I did when I print the gameboard. The last issue I ran into was breaking the loop for the amount of moves made. I noticed that player one (x) was getting 5 moves and so was player 2 (o). I realized that I needed to create an if statement where if the loop gets to 4 for player 2 (o) then the program would stop. The allowed player 2 (o) to only have four moves that it could make.

Problems I ran into (for GUI):

I ran into many problems while creating the GUI for my game. My initial problem was that I did not know swing so I had to watch a video that taught me how to use swing. I learned about how to use a panel container, JFrames, JButtons, action listeners and more. Moreover, I learned how to use many other swing properties in order to create the GUI.

Conclusion:

I realized that I need to spend more time learning how to use swing in order to create GUI's in the future. My takeaway is to watch a youtube tutorial that breaks down how to use swing and then I will implement what I learn in my next prograaming project. I believe this is a great step to diversify my knowledge in not only Java but also programming.

tictactoe's People

Contributors

prethelalam avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.