-
RNG Dice ??? - Open for interface suggestions.
-
Marble locations Colored marbles should be able to be moved between the board's dots.
-
Marble displacement Moving a marble onto a occupied dot should displace that marble and places it just outside the dot.
-
Winning Upon a player moving all their marbles home, a screen should be shown allowing:
- Good Game (shows a woohoo screen, game over)
- Play for Second (winner dropped out, game continues)
- Yea, right (reverts the winning move, game continues)
-
Turn highlight (but no enforcement req'd) Keep track when a player moves and pass the turn
Minimal. That's all.
- Chat window
- Login / profile icons
- Swipe/flick up for chat
- Touch zoom and pan
- Tap pick up and place marble
https://blazing-torch-1472.firebaseio.com
Google OAuth
Facebook OAuth // TODO get an Fb key
Kick the app of for the first time. Should auto-detect any login and set App.user
.
Stores the currently logged in user data (or null
).
Shows the OAuth popup for provider
('google'
, or ) authentication. Fires 'facebook'
App.trigger ('auth', User user)
on success.
The user has been authenticated successfully
Log the user out. Fires App.trigger ('unauth')
on sucess.
The user logged out.
Creates a new game on the server.
Fires App.trigger ('createGame', String code, Game game)
then App.trigger ('joinGame', String code, Game game)
on success where code
is a unique game identifier (4 characters, to be shared with other players) and game
is a new instance of Game
.
This user has created a new game.
Finds a game on the server with code
and joins the user to it.
Fires App.trigger ('joinGame', String code, Game game)
like App.createGame
.
This user has joined a game.
Initialize the game board and pieces.
This should never be instantiated, except by App.createGame
or App.joinGame
. It's arguments and such are not dictated in this spec.
Claim to have won.
Fires Game.trigger ('win', App.user, new Win (...))
for all players.
Someone said they won. move
would always be triggered immediately before this event.
Leave the game and close the chat connection. Fires trigger ('quit', App.user)
for all users on success.
Some user (maybe this user) has quit.
An object representing a player's marble.
This should never be instantiated, except by Game
. It's arguments and such are not dictated in this spec.
The user who owns this marble.
The game this marble is part of.
The hole this marble is located in.
Move this marble to a new hole.
Fires Marble.trigger ('move', newHole)
for all players on success.
This marble has moved.
Scoot this marble out of the way for another incomer.
Fires Marble.trigger ('bump', newMarble)
for all players on success.
This marble has been bumped.
An object representing a proposed win by a player.
This gives the user a few options. Someday there should be some kind of voting between players, but for now, everything is final.
This should never be instantiated, except by Game
. It's arguments and such are not dictated in this spec.
The user who may have won.
Overturn the winning claim and revert the last (winning) move.
These functions fire trigger (name)
on success with no arguments.
Somebody overturned the claim.
Continue playing without the winner until the next player wins.
Somebody chose to keep playing for second (or third, or...).
Leave the game. Don't close the chat connection, though.
Somebody ceded the game.