Skip to content

understanding the score parameter #6

Answered by danlangford
danlangford asked this question in Q&A
Discussion options

You must be logged in to vote

so what i can tell from this code:

// parse players
	for (i=0; i<BMD_MAX_PLAYERS; i++)
	{
		Read();
		INT p, dice;
		F32	score;
		if (sscanf(line, "player %d %d %f", &p, &dice, &score)<3 || p!=i)
			BMF_Error( "missing player: %s", line );
		ParsePlayer(p, dice);
		// don't clobber score in INITIATIVE phases
		if (g_game.GetPhase()!=BME_PHASE_INITIATIVE && g_game.GetPhase()!=BME_PHASE_INITIATIVE_CHANCE && g_game.GetPhase()!=BME_PHASE_INITIATIVE_FOCUS)
			g_game.GetPlayer(p)->m_score = score;
		// if this is still preround, then print all dice (i.e. including those not ready)
		if (g_game.IsPreround())
			g_game.GetPlayer(p)->DebugAllDice();
		else
			g_game.GetPlayer(p)->Debug();
	}

the P…

Replies: 1 comment 1 reply

Comment options

danlangford
Dec 23, 2020
Collaborator Author

You must be logged in to vote
1 reply
@pappde
Comment options

Answer selected by danlangford
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants