GithubHelp home page GithubHelp logo

tictactoeproject's Introduction

This project was based on the tutorial found at: https://www.youtube.com/watch?v=ftJ66kZhdLk 

This project entailed the writing in java of 2 classes which would allow the user to play a game of TicTacToe 
with the TicTacToe2 class being run in the console to start the game.

TicTacToe2 declares an object of type TicTactToeFrame2. This is the other class which is responsible 
for the creation of the JFrame object which in contains a JLabel component and a JPanel component 
which holds the 9 Cell objects in a GridLayout format of 3 rows and 3 cells.

In the code on which the project was based a JLabel object JLblStatus was used to provide the user with relevant information 
to the game. I changed the display position of this JLabel from the South position (in the GridLayout layout of the JPanel 
object containing and organizing the cells) to the North position.

This project contains a MouseListener function such that when one of the Cells of the frame are clicked with an event 
occurs which triggers the myMouseListener class which fills in the cell that has been clicked on, determines if the game is over
and displays an appropriate message to the end user.

tictactoeproject's People

Contributors

conormoloney96 avatar

Watchers

James Cloos avatar  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.