DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports Events Over 2 million developers have joined DZone. Join Today! Thanks for visiting DZone today,
Edit Profile Manage Email Subscriptions Moderation Admin Console How to Post to DZone Article Submission Guidelines
View Profile
Sign Out
Refcards
Trend Reports
Events
Zones
Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
  1. DZone
  2. Coding
  3. Java
  4. Java Code Challenge: Tic-Tac-Toe

Java Code Challenge: Tic-Tac-Toe

Do you think you've got what it takes to make the cleanest, best-tested command line Tic-Tac-Toe game on DZone? Here's your chance to prove it.

Grzegorz Ziemoński user avatar by
Grzegorz Ziemoński
·
Feb. 09, 17 · Survey/Contest
Like (9)
Save
Tweet
Share
9.02K Views

Join the DZone community and get the full member experience.

Join For Free

It's been quite some time since our fantastic community proven their coding skills in actual coding instead of some overly theoretical comment wars. Here I come with a potential relief — a coding challenge.

The task is to implement a simple command-line Tic-Tac-Toe game using Java. Of course, merely making it work is only a part of the problem. What we're looking for here is the cleanest, well-tested solution; a design that deserves respect.

To submit your solution, push it to a public GitHub repository and post the link in the comments. The most interesting solutions (or their parts) will be presented and discussed in a post around the beginning of March, so make sure you don't miss the chance for fame and glory!

Minimum Requirements

  • The game runs in the command line. We're more concerned with the internal design than a beautiful GUI.

  • Input is passed in the form of coordinates e.g. "1,1" to place the symbol in the middle of the board.

  • Players play on a 3x3 board, with three consecutive symbols required to win the game.

  • Two human players can play against each other on the same computer.

  • A board is printed after each player moves.

  • The game ends when one of the players wins or the board is full.

Bonus requirements

If you have some spare time or just want to test your design by adding more requirements, here are some ideas:

  • A human player can play against the computer (again, make it clean, no advanced AI required)

  • Boards bigger than just 3x3 are supported.

Java (programming language)

Opinions expressed by DZone contributors are their own.

Popular on DZone

  • Top 10 Secure Coding Practices Every Developer Should Know
  • Public Cloud-to-Cloud Repatriation Trend
  • Distributed Stateful Edge Platforms
  • How to Cut the Release Inspection Time From 4 Days to 4 Hours

Comments

Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com
  • +1 (919) 678-0300

Let's be friends: