Code Monkey home page Code Monkey logo

archmage's People

Contributors

billstclair avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

archmage's Issues

Option for Pieces.drawPiece to NOT draw the bounding box

Archmage.elm draws the board with long lines, so it's not necessary for Pieces.drawPiece to draw the bounding box. It will sometimes be nice, when you need a piece by itself in documentation, but there should be an argument that elides it.

Ko

Need to keep track of all prior board states (with the same number of pieces on the board) and not allow one to be repeated.

Public Games

The wire protocol handles public games, and I think the server tracks them, but there is not yet a UI for them. Add it.

Complete game history

Players will probably eventually request a full game history, replay-able, and restartable at any point. This issue is about how to do that.

A move may be encoded as "", e.g. "A1B2C3h". That's 7 characters. The will be blank for the initial 14 setup moves. Each turn can be stored in a separate key/value pair in the local storage, with keys of "archmage-", where is an integer from 1 to the total number of turns.

The journal for the current turn is all the undo information that is necessary, and all that needs to be saved on each update. It's a maximum of 14 long, since a move turns that move's actor the other player's color. That's a maximum of 14*7 = 98 characters per turn (just append together the fixed-length moves)

I don't know how many turns it takes to finish a game, but if a piece is captured only once every 10 turns, and I've never seen it take anywhere near that long, then there are a maximum of 13*10 = 130 turns in a game, which is a maximum of 13,000 characters.

Save chat state

Need to save the state of the chat with the model, so that refresh restores the conversation.

Automatic Ko detection

If, on his first move of this turn, a player has no sequence of moves that end up in a novel position, there is currently no way for him to end his turn and force the other player to make a sequence of moves that DOES end up in a novel position. That's because I was afraid of the combinatorial explosion to determine it.

There is NO combinatorial explosion. You have to try at most the number of position that are in GameState.history list, which isn't many.

Turn should not end automatically

Currently, when a player is out of legal moves, the game automatically ends his turn, and makes it the other player's turn. It should not do this. It should wait for the "End Turn" button to be pressed, so that the player can undo.

Add row and column labels

The rows are labelled from the top, from A to G. The columns are labelled from the left, from 1 to 7. Those labels need to be visible, so that players of the single-computer game, but in different locations, communicating over chat or phone, can easily name the squares.

Click outside board to push piece off

Make the board 9x9, with the top & bottom rows and left and right columns black. Click there to push a piece off the board, not the center hole.

Since this wastes a lot of screen real estate, small-screen users probably won't want it, so make it an option.

UI changes

Put the columns numbers below the board and reverse the order of the row letters. This more closely matches standard chess board labels.

Keep "Help" and "Rules" links at the top, but move the "End Turn" and "Undo" buttons to just below the row of column numbers. Remove the bottom row of buttons/links.

Make the "End Turn" and "Undo" buttons bigger.

Show only a single row of captured pieces. Add black from the left and white from the right.

Show chat text area, input line, "Send" button, and font resizing buttons, below the "End Turn" and "Undo" buttons, but only during an active remote game. Persist the font size.

End of game detection

End of game isn't always detected. It should be.

This means that neither player has any sequence of moves that doesn't end in Ko.

It also requires allowing the current player to end his turn even if that would mean that the other player has no moves that don't end in Ko. That's one way to force end of game. At worst it means that the other player has to give back the turn.

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.