Skip to main content
added 4 characters in body
Source Link
user
  • 387
  • 2
  • 21
  • 68

Half-life

module.exports = class {
    constructor(controller) {
        this.controller = controller;
    }
    
    play_hand() {
        var np = this.controller.np()
        var bid = np < 10 ? np - 1 : Math.floor(np / 2);
        this.controller.declare(bid);
    }
};

Takes the number of nose points it has and bids half each time. However, if it has less than 10 np left, it goes all in. This is to hopefully defeat half_way.

Half-life

module.exports = class {
    constructor(controller) {
        this.controller = controller;
    }
    
    play_hand() {
        var np = this.controller.np()
        var bid = np < 10 ? np : Math.floor(np / 2);
        this.controller.declare(bid);
    }
};

Takes the number of nose points it has and bids half each time. However, if it has less than 10 np left, it goes all in. This is to hopefully defeat half_way.

Half-life

module.exports = class {
    constructor(controller) {
        this.controller = controller;
    }
    
    play_hand() {
        var np = this.controller.np()
        var bid = np < 10 ? np - 1 : Math.floor(np / 2);
        this.controller.declare(bid);
    }
};

Takes the number of nose points it has and bids half each time. However, if it has less than 10 np left, it goes all in. This is to hopefully defeat half_way.

added 76 characters in body
Source Link
user
  • 387
  • 2
  • 21
  • 68

Half-life

module.exports = class {
    constructor(controller) {
        this.controller = controller;
    }
    
    play_hand() {
        this.controller.declare(Math.max(1, Math.floor(this.controller.np() / 2)));
    }
};
module.exports = class {
    constructor(controller) {
        this.controller = controller;
    }
    
    play_hand() {
        var np = this.controller.np()
        var bid = np < 10 ? np : Math.floor(np / 2);
        this.controller.declare(bid);
    }
};

Takes the number of nose points it has and bids half each time. However, or 1if it has less than 10 np left, whicheverit goes all in. This is greaterto hopefully defeat half_way.

Half-life

module.exports = class {
    constructor(controller) {
        this.controller = controller;
    }
    
    play_hand() {
        this.controller.declare(Math.max(1, Math.floor(this.controller.np() / 2)));
    }
};

Takes the number of nose points it has and bids half each time, or 1, whichever is greater.

Half-life

module.exports = class {
    constructor(controller) {
        this.controller = controller;
    }
    
    play_hand() {
        var np = this.controller.np()
        var bid = np < 10 ? np : Math.floor(np / 2);
        this.controller.declare(bid);
    }
};

Takes the number of nose points it has and bids half each time. However, if it has less than 10 np left, it goes all in. This is to hopefully defeat half_way.

Source Link
user
  • 387
  • 2
  • 21
  • 68

Half-life

module.exports = class {
    constructor(controller) {
        this.controller = controller;
    }
    
    play_hand() {
        this.controller.declare(Math.max(1, Math.floor(this.controller.np() / 2)));
    }
};

Takes the number of nose points it has and bids half each time, or 1, whichever is greater.