<commit_before>const _ = require('underscore');
const Phase = require('./phase.js');
const SimpleStep = require('./simplestep.js');
const ActionWindow = require('./actionwindow.js');
const DrawBidPrompt = require('./draw/drawbidprompt.js');

/*
II Draw Phase
2.1 Draw phase begins.
2.2 Honor bid.
2.3 Reveal honor dials.
2.4 Transfer honor.
2.5 Draw cards.
    ACTION WINDOW
2.6 Draw phase ends.
 */

class DrawPhase extends Phase {
    constructor(game) {
        super(game, 'draw');
        this.initialise([
            new SimpleStep(game, () => this.bidPrompt()),
            new SimpleStep(game, () => this.showBids()),
            new SimpleStep(game, () => this.tradeHonor()),
            new SimpleStep(game, () => this.drawConflict()),
            new ActionWindow(this.game, 'Action Window', 'draw')
        ]);
    }

    bidPrompt() {
        _.each(this.game.getPlayers(), p => {
            this.queueStep(new DrawBidPrompt(this.game, p));
        });
    }

    showBids() {


        _.each(this.game.getPlayers(), p => {
            p.showBid = p.drawBid;
            this.game.raiseEvent('onHonorDialsRevealed', this);
        });
    }<commit_msg>fixed event parameter<commit_after>const _ = require('underscore');
const Phase = require('./phase.js');
const SimpleStep = require('./simplestep.js');
const ActionWindow = require('./actionwindow.js');
const DrawBidPrompt = require('./draw/drawbidprompt.js');

/*
II Draw Phase
2.1 Draw phase begins.
2.2 Honor bid.
2.3 Reveal honor dials.
2.4 Transfer honor.
2.5 Draw cards.
    ACTION WINDOW
2.6 Draw phase ends.
 */

class DrawPhase extends Phase {
    constructor(game) {
        super(game, 'draw');
        this.initialise([
            new SimpleStep(game, () => this.bidPrompt()),
            new SimpleStep(game, () => this.showBids()),
            new SimpleStep(game, () => this.tradeHonor()),
            new SimpleStep(game, () => this.drawConflict()),
            new ActionWindow(this.game, 'Action Window', 'draw')
        ]);
    }

    bidPrompt() {
        _.each(this.game.getPlayers(), p => {
            this.queueStep(new DrawBidPrompt(this.game, p));
        });
    }

    showBids() {


        _.each(this.game.getPlayers(), p => {
            p.showBid = p.drawBid;
            this.game.raiseEvent('onHonorDialsRevealed', p.drawBid);
        });
    }
{'fraction_non_alphanumeric': 0.1587909748829289, 'fraction_numerical': 0.010217113665389528, 'mean_word_length': 2.435672514619883, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4313365', 'n_tokens_mistral': 751, 'n_tokens_neox': 721, 'n_words': 158}