Code Monkey home page Code Monkey logo

pao's People

Contributors

arbrown avatar perlmonger42 avatar tombrown52 avatar walrii avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

pao's Issues

Play sound when opposing player moves

When a board is displayed (not the lobby)

  • To the player: a simple beep, bell, or "Your turn sucka" when the opposing player moves.
  • To kibitzers: a simple beep or bell when anyone moves

Clean up code

  • Properly capitalize / format SQL strings
  • Remove dead / commented code
  • Add documentation where appropriate

Chat box should scroll

The chat box needs to scroll and should auto-scroll to the bottom of the chat messages when a new message is added. The text area should receive focus.

Move the chatbox down

The new, larger, boneyard piece size causes them to overlap the text-chat window. Adjust the chatbox location so they no longer overlap.

Fix websocket notation to match documentation

Currently, the frontend sends the coordinates as A0-H3, when according to the documentation it should be A1-H4. There is a hack in the server code to account for this error that should be fixed.

Stream list of games to lobby

Open up a websocket to lobby viewers and stream the list of games to them.

Make sure to close the lobby websocket when the user navigates away! :)

Fix Dead Pieces CSS

PR #27 enlarged the dead pieces container css instead of the dead pieces themselves. Please adjust the .dead-pieces .banqi-square styles in banqi.css as appropriate and revert the previous change.

Create simple AI

Create a reference AI that is capable of communicating over websocket with Pao

Game called Thom a loser.

This may or may not be true, but in this particular game, he actually won. Fix the code so it reports the correct winner.

Integrate with Discord

When you create a new game, automatically create a discord channel. When a player or spectator joins the game, prompt to switch the user to the discord channel.

Game should display dead pieces

The game should show the dead pieces in a list below or to the side of the board. They should be grouped by color, and ordered by kill order in the game, or piece strength (king to pawn, then cannon.) Perhaps clicking the dead pieces section could toggle.

Bikeshed the graveyard

Second round of improvements to the graveyard. Some topics for discussion/consideration:

  • Separate live/dead pieces
  • Change the shading to shade live pieces instead of dead ones (ie, make it easier to see dead ones at a glance)
  • Display some statistic of power remaining (strength of pieces based on a formula)
  • Display relative statistics of turning up any given unflipped piece

Spectator suggested moves

Allow spectators to suggest moves by double clicking a cell. The moves should show up in chat with the name of the people that suggested it.

Highlight recent move

Make it clear when an opponent has made a move by highlighting that move on the board.

For example:

  • Highlight the space of a newly flipped piece
  • Highlight the space a piece moved into
  • Highlight the space a piece moved from
  • Highlight a recently captured piece in the dead pieces section.

Highlight most recently killed piece in boneyard

Now that live pieces are technically visible in the boneyard, we should highlight the most recently killed one with the "last-killed" highlight instead of always highlighting the first.

2020-05-30 21_37_47-Ban Qi
In this picture, a second red pawn has just been taken, but the same pawn that was killed the turn prior retains its "last-killed" highlighting instead of the most recent one to turn dark/dead.

It's pedantic and unimportant, I know...

Graveyard Improvements

I've been thinking about redoing the dead pieces.

Here are some use cases, things I've sometimes tried to compute, or think others might want

  • I want to know which pieces are dead (current dead pieces)
  • I want to know which pieces are still face down (can be mentally computed from board and current dead pieces)
  • I want to what pieces are not dead (inverse of dead pieces)
  • New players want to be reminded of the piece ranking
  • New players sometimes want to be reminded of the logograms
  • New players want compare the logograms of red vs black

My conclusions

  • For new players, all the pieces, up, down, and dead need to be represented, in order
  • It should be easy to tell, which pieces are down, up, and dead from their appearance

Ideas

  • The dead pieces should stand out, or be the most obvious
  • The up and down pieces should be dimmer,
  • Down pieces should be green, or have a green cast to them, or a green circle
  • Perhaps dead pieces could have an X or slashed circle or headstone superimposed, but not enough to obsure the logogram
  • A hover should identify eash piece and its status

Stale games do not disappear from game list

Somehow, walrus managed to start a game and join it again as himself. Then, the first him couldn't make a move or resign and the game was just stuck.

Not sure how the first websocket did not close. It should have closed and stopped the game.

Screen Shot 2020-05-26 at 12 36 46 PM

Refactor the ugly GO code

It probably belongs in different packages. Only the main file (pao.go) should be in the root folder, with the rest in packages (or just one other package...)

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.