Coder Social home page Coder Social logo

wdi-js-tictactoe-template's Introduction

Angular mini project

You are a are going to implement good old Tic Tac Toe in Angular JS!

As a starting point, here's a template using JavaScript/jQuery. It contains all files with stubs for a plain JavaScript solution.

	https://github.com/aikalima/wdi-js-tictactoe-template

It contains:

  • complete set of styles
  • all images
  • index.html
  • tictactoe.js

Examine tictactoe.js. Comments provide hints on how to model data structures and implement function stubs. Read the comments carefully.

Think about how you would approach game play, how to manage players, detect win/tie, update UI, etc.

After you've done some thinking, go here to see a complete solution in plain JavaScript.

https://github.com/aikalima/wdi-js-tictactoe-final

We leave it up to you how much you want to challenge yourself. You can use the solution as a model for your app, or just for hints on how to solve certain aspects, or don't look at it at all :-)

Both repos contain a bare bones node web server (same one we used in Mondays lesson). After fork/clone, simply fire it up:

node web-server.js

and go to

localhost:8000

###Requirements

  • Start a new project and implement the game in Angular JS
  • Feel free to build on top of rails or use node web server that is in the solution. Tic Tac Toe doesn't require api server calls, so it doesn't really matter.
  • One controller and a single view is probably all you need, so no routes or resources required.
  • Don't use jQuery or the native DOM api, instead bind DOM elements the Angular way.
  • The original solution comes with all bells and whistles, like delayed fade-in animation and other goodies. That's not a requirement but try to make your app feel as close as possible to the original.
  • We encourage you to write in CoffeeScript, but feel free to use plain JavaScript if that's what you are in to.
  • Add the option to allow Ernie to play against the computer instead of Bert. The algorithm should be better than picking tiles randomly.

###Bonus

  • Implement an algorithm that can't be beat.

wdi-js-tictactoe-template's People

Contributors

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