Akavall / GoGamesProject

Trying to make some simple games using golang.
1 stars 1 forks source link

Get rid of sleep calls in zombie_dice.go #29

Open Akavall opened 9 years ago

Akavall commented 9 years ago

If I recall correctly, I put them there, and that was a merge I did by accident without review.

Sleep calls don't belong there. What if we want to match two AI for 1,000,000 rounds?

I think we should get rid of them :).

a-temlyakov commented 9 years ago

I think they are OK when isolated to just terminal based game because otherwise the AIs turn is too fast and there is too much information. But I agree that they shouldn't get in the way of other stuff like matching two AIs against each other.... that could be a fun go-routine exercise - spawn a 1000 threads and do a million rounds in each. :D

Akavall commented 9 years ago

Yeah, I think the sleep call are useful, but right now they are in the wrong place.

I guess we could spawn as many goroutines as we want, but don't we stop making gain after we exceed number of processors?