Giter VIP home page Giter VIP logo

remote-resistance's People

Contributors

bholtbholt avatar dependabot[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

remote-resistance's Issues

Abstract socket.emit events into its own file

This should make it easier to understand what events need to be called for a state to move forward.

WIP:

// pre game
emit('ruleset::generate', ruleset);
emit('rounds::init', ruleset);
emit('leader::init', $players);
emit('appstate::set', 'IN_GAME');

// team selection
emit('team::selection', this.value);
emit('team::confirmation', $team);
emit('phase::set', 'TEAM_VOTE');

// team vote
emit('teamvote::cast', { playerId: $currentPlayer.id, vote: playerVote });

// if votes fail
emit('rounds::update', [$currentRound.index, update]);
emit('leader::change');

emit('phase::set', 'TEAM_REVEAL');

// pick new team
emit('teamvote::reset');
emit('team::reset');
emit('phase::set', 'TEAM_SELECTION');

// start mission
emit('phase::set', 'MISSION_START');

emit('missionvote::cast', { playerId: $currentPlayer.id, vote: playerVote });

emit('rounds::update', [
  $currentRound.index,
  {
    winner: $missionPassed ? 'resistance' : 'spies',
    missionPhase: {
      team: $team,
      votes: $missionVotes,
      result: $missionPassed ? 'successful' : 'failed',
    },
  },
]);
emit('leader::change');
emit('phase::set', 'MISSION_REVEAL');

emit('missionvote::reset');
emit('team::reset');
emit('teamvote::reset');
emit('phase::set', 'TEAM_SELECTION');

// end game
emit('appstate::set', 'PRE_GAME');
emit('missionvote::reset');
emit('team::reset');
emit('teamvote::reset');
emit('rounds::increment');
emit('phase::set', 'TEAM_SELECTION');
emit('rounds::reset');
window.sessionStorage.removeItem('hideRoleReveal');

Fix avatar selection

Avatar disabling on the player form only fires onMount because of how the form is set up. Look at voting forms and team selection form to switch it to Svelte style (holding the variable in memory) and then avatars will probably disable properly

Also, randomize the avatar so it's not always the first

Block bots from scanning for WP content

/sitemap.xml
/robots.txt
/wp-login.php
"//wp-includes/wlwmanifest.xml"
"//xmlrpc.php?rsd"
"//blog/wp-includes/wlwmanifest.xml"
2021-11-26T23:32:56.568804+00:00 heroku[router]: at=info method=GET path="//blog/wp-includes/wlwmanifest.xml" host=resistance.quest request_id=7fbcdf03-f7dc-4f7a-87f9-56695d86385b fwd="165.22.101.166" dyno=web.1 connect=0ms service=1ms status=404 bytes=657 protocol=https
2021-11-26T23:32:56.795829+00:00 heroku[router]: at=info method=GET path="//web/wp-includes/wlwmanifest.xml" host=resistance.quest request_id=2a6e3140-95b5-4955-bf24-c1baee4c1e83 fwd="165.22.101.166" dyno=web.1 connect=0ms service=1ms status=404 bytes=656 protocol=https
2021-11-26T23:32:57.022341+00:00 heroku[router]: at=info method=GET path="//wordpress/wp-includes/wlwmanifest.xml" host=resistance.quest request_id=6a7463fc-db6b-4193-9e3e-1a3209d6f4f0 fwd="165.22.101.166" dyno=web.1 connect=0ms service=1ms status=404 bytes=662 protocol=https
2021-11-26T23:32:57.248991+00:00 heroku[router]: at=info method=GET path="//website/wp-includes/wlwmanifest.xml" host=resistance.quest request_id=747cf773-8b35-4eda-9a3d-e1b8c8f03bb1 fwd="165.22.101.166" dyno=web.1 connect=0ms service=1ms status=404 bytes=660 protocol=https
2021-11-26T23:32:57.475702+00:00 heroku[router]: at=info method=GET path="//wp/wp-includes/wlwmanifest.xml" host=resistance.quest request_id=696fe40a-5986-439a-b2b1-de9ab3e4b297 fwd="165.22.101.166" dyno=web.1 connect=0ms service=1ms status=404 bytes=655 protocol=https
2021-11-26T23:32:57.703713+00:00 heroku[router]: at=info method=GET path="//news/wp-includes/wlwmanifest.xml" host=resistance.quest request_id=4f3c94a5-9c43-4b98-8060-1b9c63a0f0f7 fwd="165.22.101.166" dyno=web.1 connect=0ms service=1ms status=404 bytes=657 protocol=https
2021-11-26T23:32:57.930348+00:00 heroku[router]: at=info method=GET path="//2020/wp-includes/wlwmanifest.xml" host=resistance.quest request_id=32718dcc-81d7-44b1-a319-beb7bd4963a6 fwd="165.22.101.166" dyno=web.1 connect=0ms service=1ms status=404 bytes=657 protocol=https
2021-11-26T23:32:58.157349+00:00 heroku[router]: at=info method=GET path="//2019/wp-includes/wlwmanifest.xml" host=resistance.quest request_id=a9d7afdb-e8cd-4851-ae55-07fd1a940b21 fwd="165.22.101.166" dyno=web.1 connect=0ms service=1ms status=404 bytes=657 protocol=https
2021-11-26T23:32:58.383993+00:00 heroku[router]: at=info method=GET path="//shop/wp-includes/wlwmanifest.xml" host=resistance.quest request_id=e4cd433a-b474-48d3-992a-f5695c72b71d fwd="165.22.101.166" dyno=web.1 connect=0ms service=1ms status=404 bytes=657 protocol=https
2021-11-26T23:32:58.622661+00:00 heroku[router]: at=info method=GET path="//wp1/wp-includes/wlwmanifest.xml" host=resistance.quest request_id=521a2127-e3f2-4d34-bb9f-438981b7c117 fwd="165.22.101.166" dyno=web.1 connect=0ms service=1ms status=404 bytes=656 protocol=https
2021-11-26T23:32:58.849395+00:00 heroku[router]: at=info method=GET path="//test/wp-includes/wlwmanifest.xml" host=resistance.quest request_id=f3e0f667-4868-4a6a-ba98-d397809fe6f4 fwd="165.22.101.166" dyno=web.1 connect=0ms service=1ms status=404 bytes=657 protocol=https
2021-11-26T23:32:59.076849+00:00 heroku[router]: at=info method=GET path="//wp2/wp-includes/wlwmanifest.xml" host=resistance.quest request_id=be2827db-adbb-4fba-b251-7fa67b48c7bc fwd="165.22.101.166" dyno=web.1 connect=0ms service=1ms status=404 bytes=656 protocol=https
2021-11-26T23:32:59.303819+00:00 heroku[router]: at=info method=GET path="//site/wp-includes/wlwmanifest.xml" host=resistance.quest request_id=3a5f6523-f7a0-493d-8556-277300b5781a fwd="165.22.101.166" dyno=web.1 connect=0ms service=1ms status=404 bytes=657 protocol=https
2021-11-26T23:32:59.531486+00:00 heroku[router]: at=info method=GET path="//cms/wp-includes/wlwmanifest.xml" host=resistance.quest request_id=b85dc4e3-c4b9-489e-9f60-ffeb8864fe0d fwd="165.22.101.166" dyno=web.1 connect=0ms service=1ms status=404 bytes=656 protocol=https
2021-11-26T23:32:59.768107+00:00 heroku[router]: at=info method=GET path="//sito/wp-includes/wlwmanifest.xml" host=resistance.quest request_id=3a74568e-a5ad-46b3-b079-626ffe214d67 fwd="165.22.101.166" dyno=web.1 connect=0ms service=11ms status=404 bytes=657 protocol=https

Lighten light mode

Try:

    bg-indigo-400
    dark:bg-gray-800
    bg-fixed bg-gradient-to-b
    from-indigo-400
    via-rose-200
    to-orange-100
    dark:from-gray-800 dark:to-purple-900

Morning of a morning sunrise instead of sunset. Lots of text colours need to change, but it's much, much lighter and different from dark mode

Text Pass

  • join next game? How can I make the reset trigger? Clear players, while also retaining them
  • capitalization
  • punctuation

Rejoin game

If the player loses their connection (specifically session storage key), allow them to rejoin the game (login as player).

  • rejoin game button
  • select player to become
  • prompts other players to approve
  • on success, logs in player

consider:

  • replaying events
  • slow connections
  • hijacking other players (is it a feature?)

Change mockHistory with ENV variable

                                                   .
                                                 .o8
oooo d8b  .ooooo.  ooo. .oo.  .oo.    .ooooo.  .o888oo  .ooooo.
`888""8P d88' `88b `888P"Y88bP"Y88b  d88' `88b   888   d88' `88b
 888     888ooo888  888   888   888  888   888   888   888ooo888
 888     888    .o  888   888   888  888   888   888 . 888    .o
d888b    `Y8bod8P' o888o o888o o888o `Y8bod8P'   "888" `Y8bod8P'

                             o8o               .
                             `"'             .o8
oooo d8b  .ooooo.   .oooo.o oooo   .oooo.o .o888oo  .oooo.   ooo. .oo.    .ooooo.   .ooooo.
`888""8P d88' `88b d88(  "8 `888  d88(  "8   888   `P  )88b  `888P"Y88b  d88' `"Y8 d88' `88b
 888     888ooo888 `"Y88b.   888  `"Y88b.    888    .oP"888   888   888  888       888ooo888
 888     888    .o o.  )88b  888  o.  )88b   888 . d8(  888   888   888  888   .o8 888    .o
d888b    `Y8bod8P' 8""888P' o888o 8""888P'   "888" `Y888""8o o888o o888o `Y8bod8P' `Y8bod8P'

Do votes need confirmation?

I've used a confirmation model the entire game, but maybe it doesn't need that.

This could be a game rules option, where confirmation can be turned off

PlayerText component

Should be something like:

<span class="whitespace-nowrap">😍 Name</span>

Used in the titles, but current the names break across lines

Paused or dropped connections

How to handle when the connection is dropped? The events don't continue to play.

Ideas:

  • maybe remove "once" from history::init
  • Maybe sockets.io has a reconnection method
  • maybe a timeout, if an event hasn't happened for a while it retriggers

Javascript error:

https://remote-resistance.herokuapp.com/socket.io/?EIO=4&transport=polling&t=NqbOcEb
net::ERR_INTERNET_DISCONNECTED

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.