Socket
Socket
Sign inDemoInstall

e-champ-durak

Package Overview
Dependencies
0
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.4.2 to 1.4.3

4

action/AttackAction.js

@@ -14,3 +14,3 @@ /**

}
const play = this.play;
const {play} = this;
if (this.hand === play.defender) {

@@ -64,3 +64,3 @@ return this.setError('Defender cannot attack');

execute () {
const play = this.play;
const {play} = this;
const data = [];

@@ -67,0 +67,0 @@ for (const card of this.cards) {

@@ -14,3 +14,3 @@ /**

}
const play = this.play;
const {play} = this;
const items = play.deck.parsePairs(this.data.pairs);

@@ -55,3 +55,3 @@ if (!items || !items.length) {

}
const play = this.play;
const {play} = this;
play.changedDefendingCards = true;

@@ -58,0 +58,0 @@ play.updateEmptyHands(this.hand);

@@ -14,3 +14,3 @@ /**

}
const play = this.play;
const {play} = this;
if (this.hand === play.defender) {

@@ -31,3 +31,3 @@ if (play.getActiveAttacker()) {

execute () {
const play = this.play;
const {play} = this;
play.addEvent('pass', [this.hand.pos]);

@@ -34,0 +34,0 @@ if (this.hand === play.defender) {

@@ -14,3 +14,3 @@ /**

}
const play = this.play;
const {play} = this;
if (!play.options.transferable) {

@@ -54,3 +54,3 @@ return this.setError('No transferable option');

execute () {
const play = this.play;
const {play} = this;
const data = [];

@@ -57,0 +57,0 @@ for (const card of this.cards) {

@@ -229,3 +229,3 @@ /**

isRankOnTable (rank) {
const siege = this.options.siege;
const {siege} = this.options;
for (const [attacking, defending] of this.table) {

@@ -232,0 +232,0 @@ if (attacking.rank === rank) {

{
"name": "e-champ-durak",
"version": "1.4.2",
"version": "1.4.3",
"description": "Online card game Durak for the E-Champ platform",

@@ -5,0 +5,0 @@ "author": {

@@ -7,7 +7,7 @@ /**

process () {
const play = this.play;
const {play} = this;
if (play.master !== play.winner) {
play.master.setFinisher();
}
const data = this.data;
const {data} = this;
const winner = this.getPlayer(data.winner);

@@ -14,0 +14,0 @@ const loser = this.getPlayer(data.loser);

@@ -60,3 +60,3 @@ /**

executeTurn () {
const play = this.play;
const {play} = this;
play.setAttacker(this.from);

@@ -63,0 +63,0 @@ play.setDefender(this.target);

@@ -35,13 +35,13 @@ /**

}
const table = this.play.table;
const {play} = this;
if (this.isDefender()) {
return table.hasOpenAttack() && !this.play.getActiveAttacker();
return play.table.hasOpenAttack() && !play.getActiveAttacker();
}
if (table.isEmpty()) {
if (play.table.isEmpty()) {
return this.isAttacker();
}
if (this.play.isAttackLimit()) {
if (play.isAttackLimit()) {
return false;
}
return this.play.getActiveAttacker() === this;
return play.getActiveAttacker() === this;
}

@@ -105,4 +105,4 @@

move (target, reselection) {
const card = this.selection;
if (!card) {
const {selection} = this;
if (!selection) {
return false;

@@ -116,4 +116,4 @@ }

}
const cards = this.play.table.getWeakerAttackingCards(card);
if (this.play.canTransfer(card)) {
const cards = this.play.table.getWeakerAttackingCards(selection);
if (this.play.canTransfer(selection)) {
return !cards.length || reselection ? this.transfer() : null;

@@ -120,0 +120,0 @@ }

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc