Commit Graph

37 Commits

Author SHA1 Message Date
jumbowhales
4e84ab8ced Uno: Fix syntax error (#3841) 2017-07-28 22:26:52 -04:00
Charlie Kobayashi
8a70763a76 UNO: make uno less subtle, allow player to uno before next player plays. (#3822) 2017-07-23 22:24:28 -07:00
jumbowhales
91752efa40 Uno: fix playing 2 +4s in a row (#3714)
should fix #3713, which i broke with an earlier change
2017-07-02 16:16:19 +09:00
jumbowhales
76b56bddb4 Uno: wild cards default to the color of the top card when DQd (#3578) 2017-06-19 10:49:13 -07:00
Bär Halberkamp
961ffc3f9b Upgrade eslint to 4.x (#3657) 2017-06-18 22:37:43 -07:00
Charlie Kobayashi
b90703623d Update uno.js (#3513)
- announces the presence of a game when a user joins the room.  Players will immediately see their hand instead.
- wild cards will cause the top card display to inherit the changed colour
2017-05-08 23:05:39 -05:00
Guangcong Luo
6dd58b40d3 Refactor simulator into new sim/ directory
This is a surprisingly minor refactor considering how many files it
touches, but most of this is only renames.

In terms of file renames:
- `tools.js` is now `sim/dex.js`
- `battle-engine.js` is now `sim/index.js` and its three classes are
  in `sim/battle.js`, `sim/side.js`, and `sim/pokemon.js`
- `prng.js` is now `sim/prng.js`

In terms of variable renames:
- `Tools` is now `Dex`
- `BattleEngine` is now `Sim`
- `BattleEngine.Battle` is now `Sim.Battle`
- `BattleEngine.BattleSide` is now `Sim.Side`
- `BattleEngine.BattlePokemon` is now `Sim.Pokemon`
2017-05-05 16:48:38 -05:00
Charlie Kobayashi
d447be5525 UNO: give notifications for highlights (#3446)
- only ``|c:|`` notifies, ``|c|`` apparently
2017-04-11 02:43:10 -04:00
Charlie Kobayashi
246ebde9c9 Room-games: dont rename players to their guest accounts (#3425) 2017-04-04 16:56:23 -04:00
Charlie Kobayashi
e4ff94f196 UNO: make pass action subject to suppresing (#3430) 2017-04-04 16:54:11 -04:00
Charlie Kobayashi
86f4f4ceb5 Update uno.js (#3423) 2017-04-03 14:54:18 -04:00
Anubhav Kumar
da3b008050 Add per turn highlighting to UNO (#3420)
This allows for users to be highlighted on their turns (currently a big problem) and also allows users to know if it's their turn in cases of disconnections (the current code does not).
2017-04-01 21:02:42 -04:00
Charlie Kobayashi
b9231b1321 UNO: fix +4 verification (#3407)
- forgot to check for changed colour with the last fix regarding references
2017-03-29 00:28:47 +04:00
Kris Johnson
06631e1e17 UNO: turn snake_case variables into camelCase (#3404) 2017-03-26 22:35:25 -04:00
Charlie Kobayashi
d51a5b7d67 Update uno.js (#3392) 2017-03-23 23:07:06 -04:00
Teremiare
d47aaa6ba7 UNO: Improve colored text readability (#3384) 2017-03-23 22:56:27 -04:00
panpawn
79462da881 UNO: Fix various style issues & improve UI (#3389) 2017-03-22 23:04:53 +04:00
Spandan Punwatkar
ade78bd2c7 Add Join button to UNO declaration (#3383) 2017-03-22 01:11:39 -04:00
Kris Johnson
ce09ebf526 UNO: Add command aliases (#3382) 2017-03-22 00:42:17 -04:00
Charlie Kobayashi
2b4c2cae32 UNO: Fix being stuck in color state (#3385) 2017-03-22 03:38:26 +04:00
Charlie Kobayashi
1fb786e32d "colour" => "color"
- use American spelling of "colour" (aka "color")
(minor: - change two ``let`` => ``const``)
2017-03-20 23:38:01 -05:00
Charlie Kobayashi
2181ab8a25 Colour fix
- made the darker end of the blue card less blue
- made the yellows go to a paler yellow for one end and use a slight orange tinge for the "darker" spectrum of the yellow
2017-03-20 23:38:01 -05:00
Charlie Kobayashi
badd084bae Make yellow more "yellow" 2017-03-20 23:38:01 -05:00
Charlie Kobayashi
4698ce5fc5 Update uno.js 2017-03-20 23:38:01 -05:00
Charlie Kobayashi
594a9e0e99 Update uno.js 2017-03-20 23:38:01 -05:00
Charlie Kobayashi
74a54b53da Update uno.js 2017-03-20 23:38:01 -05:00
Charlie Kobayashi
e5c0d730f1 Update uno.js 2017-03-20 23:38:01 -05:00
Charlie Kobayashi
fbad7c9c84 Update uno.js 2017-03-20 23:38:01 -05:00
Charlie Kobayashi
b21715639e Update uno.js
- gradients to cards for Slayer-senpai
- use the button class for cards
- make pass/draw buttons less hard
- put in Zarel-senpai's recommendations for text shadows

- display updated cards after playing anything
2017-03-20 23:38:01 -05:00
Charlie Kobayashi
8c19124817 Fix display style / mechanics
Display changes:
- done to Zarel's request/suggestions!
- hides the UNO button automatically the turn after

Drawing: 
- refactored regular drawing of a card to be an "event" of its own (onDraw)
- prevents users from drawing a card after playing a colour card (drawing can only happen in during the "play" state now)
- only drawing on your own turn will show you your hand display (you can still view your hand any time using ``/uno`` or ``/uno hand``)

UNO handling:
- handles uno parsing if the next player draws, refactored into it's own function as well (since it occurs at both the draw and the playing part)
- for 2p games, if the user does not say uno before playing their last card (Skip => [last card]), they can draw/play without having to say UNO and be penalized 2 cards (in official rules, iirc you have to beat the next player's actions, and not your own)
2017-03-20 23:38:01 -05:00
Charlie Kobayashi
d18430bdd2 Fix sorting
- also made blue cards have white text...
2017-03-20 23:38:01 -05:00
Charlie Kobayashi
a3a6f62a61 Update uno.js
- used Array#find for checking if the card exists.
- split the html for hand display into several lines (had to use + to join the strings since template strings allow newlines just by pressing enter) - Do we __have to__ do it using client-side css?  I'm pretty sure that hangman and other chat plugins just list the styling stuff in the HTML as well.
- used a simpler sort ``this.hand.sort((a, b) => (a.colour > b.colour) || (a.colour === b.colour && a.value > b.value))``  Sorry Slayer, your method doesnt seem to work since it mixes between sorting by colour and value
- limited timer to max 300 seconds (5 minutes)... PS users already complain that 150 seconds for battles is already too much...
2017-03-20 23:38:01 -05:00
Charlie Kobayashi
fd907e1015 Fix disabling 2017-03-20 23:38:01 -05:00
Charlie Kobayashi
60155e9bad Remove unnecessary code
- remove ``.fill(0)``
2017-03-20 23:38:01 -05:00
Charlie Kobayashi
764da53d1b Change createDeck() to match Zarle's comment 2017-03-20 23:38:01 -05:00
Charlie Kobayashi
c03ab8e604 Update uno.js 2017-03-20 23:38:01 -05:00
Charlie Kobayashi
b8bc6d1f14 Create uno.js 2017-03-20 23:38:01 -05:00