Coder Social home page Coder Social logo

overcomplicated-tic-tac-toe-java-istvanzsolnai's Introduction

Overcomplicated TicTacToe

Your job is to write a single player TicTacToe game based on microservices. First you have to model the game (state and movements), and connect it with the UI. Then write a simple version for all the extra services and wire them together. Then you should upgrade the services either by adding new features or by re-using existing third party services. For example, there is a nice TicTacToe AI solution out there you can use for the machine's move. After that you can come up with your own AI solution.

Run

The Repository contains five separate modules, four of them are completely empty. You can start overcomplicated-ticatactoe, a Spring Boot application. It has a single page with the basic functionalities all set.

What to do next?

The vision

The idea behind this system is to build multiple services for smaller parts. This will allow autonomous development and maintenance. The architect guy created the following component UML:

UML

Services one by one

The project, beside the main application, should contain several services. You can use any framework, Spring, Spark, or even Flask with Python if you like. They should use ports from 60000.

funfact-service

This service generates a fun fact for showing it next the game board to make your TicTacToe more fun. You can use your own collection first, then implement it using for example this Chuck Norris fact generator: https://api.chucknorris.io/.

comics-service

A service to help showing a comic. One possible source is to return a random piece from http://xkcd.com/. Use xkcd's JSON API, http://xkcd.com/1001/info.0.json, where 1001 is a random number between 1 and 1929. This API returns a lot of info, use only the image and the hover text.

avatar-service

It should generate a profile avatar picture's URI. It can be anything, the only requirement is to keep the picture unchanged during the session. Possible sources:

Read the documentations, and use the solution that you like.

tictactoe-ai-service

The logic behind the computer's move. First use a 'dumb' solution. Then you can boost up the computer's success by using this service, written in Node.js and running on Heroku:

If you use stujo's API signature for your own service, the the forwarding and the switch will be pretty easy.

Extra features

  • Use proper logging for your services
  • Write mocks and tests for your services
  • AJAXify the movement clicks
  • Use template fragments to reduce duplication
  • Make a UI switch to change between different AIs (yours and stujo's)
  • Add a multiplayer mode as well

overcomplicated-tic-tac-toe-java-istvanzsolnai's People

Contributors

zoltansallay avatar

Watchers

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