GithubHelp home page GithubHelp logo

tic-tac-toe's Introduction

Tic Tac Toe

How to Run

Gradle

First cd into the file tic-tac-toe. Then run gradle build. If you recieve an error stating Execution failed for task ':verifyGoogleJavaFormat'., run gradle goJF.

Then run gradle run to have the program run.

Java

Compile the code with javac src/main/java/Main.java. Run the code with java src.main.java.Main.

Functional Requirements

  • MANDATORY:
    • Gather and display user names. Decide who makes the first move (assign the X mark). (x)
    • Display a proper board. (x)
    • Take turns letting the players move. (x)
    • Detect and announce when one wins. (x)
      • Prevent illegal moves. (x)
      • Indicate a draw. (x)
  • OPTIONAL:
    • When the game is over, give the same players a chance to play again. (x)
    • Track the players' scores across games.
    • Swap X and O between players every game.

To Do

  1. Create update function.
    • Updates UI to reflect new choice.
    • Changes player.
    • Changes symbol being written to grid.
  2. Create UI.
    • Create grid.
    • Create/choose symbols for X and O.
  3. Create print function.
    • Prints the UI to the screen.
  4. Implement user input.
    • Allow user to input choice of where in the grid their symbol should go.
    • Checks for input that cannot be used/will cause an error and asks for new input.
    • Checks to see if there is a winner and updates variables as needed.
  5. Create variables.
    • (STR) Player usernames x2.
    • (BOOL) Game completed.
    • (INT) Game rounds.

tic-tac-toe's People

Contributors

fatalst avatar

Watchers

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