A classic board game built with TDD.
Full requirements from The Odin Project can be found here.
๐ Live Demo ๐
A classic board game built with TDD.
Home Page: https://marlatte.github.io/battleship/
A classic board game built with TDD.
Full requirements from The Odin Project can be found here.
๐ Live Demo ๐
Logical flow:
A few sentences on general functionality and the steps necessary to do all those things.
Rapid clicking on squares fires computer turns that can also shoot at its own board.
Could be solved by a universal setTimeout var that removes the event listener for the same amount of time comp decision takes, though I suspect there's a better way.
Iterate over the pseudo outline, getting more specific with each pass.
If you don't know how to solve a specific challenge, mark it for the next pass or get to googling, but DO NOT skip things without making a note. That leaves unpleasant surprises for later.
This step should take a while, since it's actually several rolled into one. It ends when you run out of abstract ways to describe the steps and the pseudo is half JS anyway.
No more than is necessary to capture main elements for visualizing and attacking ships.
Do not get fancy yet!!!
Ship placement rejected at [70] because there was a ship occupying [69], which is on the other side of the board.
Walking through logical flow from first task, write out the top-level steps necessary to get this done. Don't worry about details or specific properties/methods, just finish the prompt, "Okay, then I'll need a function to do ___" for every step. Focus on what information is being passed from unit to unit. In the end, you'll have a skeleton to flesh out in the next steps.
Decouple modules by switching fn calls to event publications
Red - Green - Red - Green ...
Too many messages getting passed back and forth. Code is getting convoluted when trying to return info from a fn call. playRound
, checkCompTurn
, and checkGameOver
could all be one fn if I use import instead of PubSub.
Also, having the game-controller
decide where to place comp ships will take too many steps/msgs with PubSub.
Black / white only, basically just do the borders and minimally acceptable spacing to make it useful.
Don't get fancy, and DO NOT make any big design decisions yet!!
Currently, only mouse clicks trigger playRound()
playRound()
endGame screen doesn't display on computer win, though the game stops.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.