misc names
This commit is contained in:
parent
6978a424d9
commit
d3daa3c1f2
@ -161,12 +161,12 @@ impl Game {
|
||||
self.skill_phase_start(0)
|
||||
}
|
||||
|
||||
fn skill_phase_start(mut self, resolution_time: i64) -> Game {
|
||||
fn skill_phase_start(mut self, resolution_animation_ms: i64) -> Game {
|
||||
self.phase_start = Utc::now()
|
||||
.checked_add_signed(Duration::milliseconds(resolution_time))
|
||||
.checked_add_signed(Duration::milliseconds(resolution_animation_ms))
|
||||
.expect("could not set phase start");
|
||||
|
||||
self.phase_end = self.time_control.game_phase_end(resolution_time);
|
||||
self.phase_end = self.time_control.game_phase_end(resolution_animation_ms);
|
||||
|
||||
for player in self.players.iter_mut() {
|
||||
if player.skills_required() == 0 {
|
||||
@ -426,12 +426,12 @@ impl Game {
|
||||
// temp vec of this round's resolving skills
|
||||
// because need to check cooldown use before pushing them into the complete list
|
||||
let mut casts = vec![];
|
||||
let mut resolution_delay = 0;
|
||||
let mut r_animation_ms = 0;
|
||||
while let Some(cast) = self.stack.pop() {
|
||||
// info!("{:} casts ", cast);
|
||||
|
||||
let mut resolutions = resolution_steps(&cast, &mut self);
|
||||
resolution_delay = resolutions.iter().fold(resolution_delay, |acc, r| acc + r.clone().get_delay());
|
||||
r_animation_ms = resolutions.iter().fold(r_animation_ms, |acc, r| acc + r.clone().get_delay());
|
||||
self.resolved.append(&mut resolutions);
|
||||
|
||||
// while let Some(resolution) = resolutions.pop() {
|
||||
@ -457,7 +457,7 @@ impl Game {
|
||||
return self.finish()
|
||||
}
|
||||
|
||||
self.skill_phase_start(resolution_delay)
|
||||
self.skill_phase_start(r_animation_ms)
|
||||
}
|
||||
|
||||
fn progress_durations(&mut self, resolved: &Vec<Cast>) -> &mut Game {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user