Code Monkey home page Code Monkey logo

tictactoe's Introduction

Tic Tac Toe

TECHCareers Assignment 2 - Simple TicTacToe Console Game

This is my second C# program - a simple Tic Tac Toe game. I will not be accepting any pull requests.

Assignment

  • The flow of the game must match the traditional flow of the game.

  • An AI to play against the player is not a requirement of the base assignment.

  • The game must end and display the game state (the winner, or that the game is a draw) when the end conditions are met.

  • The console must clear between each player’s turn in order to ensure only the most up-to-date board is shown.

  • The current game board (Game Board Status in the above screenshot) must be shown each turn, so the player knows which squares are taken, and can play strategically.

  • A list of square numbers (Game Board Positions) must be shown each turn, for player to use when selecting a square in which to place their token.

  • The prompt for a square number must indicate the current player.

  • If the player makes an invalid square selection, a descriptive error message must be displayed, and the player must be prompted again (until a valid selection is made).

  • The game board data must be stored in a two-dimensional array of characters.

  • At the end of the game, the user(s) must be asked if they would like to play again and must select between ‘Y’ and ‘N’ (case insensitive). In the event of an invalid selection, they should be prompted again until a valid selection is made.

  • The program must contain the Main() method, a PlayGame() method, and a PrintGameBoard() method at a minimum. You are free to use additional methods as needed, but ensure they are named semantically and contain comment docstrings.

  • The program must be maintainable as well as functional. Another programmer should be able to look at your code/comments and understand what each line does without requiring extensive testing.

  • The program must never crash due to an unhandled exception.

Build requirements and instructions

.NET Core SDK 3.1 or newer. Older versions would probably work too but haven't been tested.

Clone the repo or download a copy/extract in a directory of own choice. Execute dotnet run in the local repo directory.

Screenshots

image
Game after startup
image
Game after a win
image
Game after a draw
image
Game prompts during incorrect user input on each move

Trello project board

Access the Trello board for the project here

tictactoe's People

Contributors

dlampa 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.