This repository has been archived on 2025-02-21. You can view files and clone it, but cannot push or open issues or pull requests.
citylimitsj/src/micropolisj/engine/Speed.java
jason@long.name ed6795dfca Importing source code for MicropolisJ, the Java rewrite of Micropolis.
This edition of Micropolis, written for the Java desktop platform,
is fairly feature complete. I believe the only missing functionality
is that of loading the built-in scenarios, and this can be implemented
if there is any demand for it.

I will soon update the home page at http://code.google.com/p/micropolis/
with downloadable packages of this edition of the software.


git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@528 d9718cc8-9f43-0410-858b-315f434eb58c
2013-02-14 21:02:42 +00:00

37 lines
1.2 KiB
Java

// This file is part of MicropolisJ.
// Copyright (C) 2013 Jason Long
// Portions Copyright (C) 1989-2007 Electronic Arts Inc.
//
// MicropolisJ is free software; you can redistribute it and/or modify
// it under the terms of the GNU GPLv3, with additional terms.
// See the README file, included in this distribution, for details.
package micropolisj.engine;
/**
* Lists the simulation speeds available.
*/
public enum Speed
{
PAUSED ( 999,999, 0),
SLOW ( 500, 5, 1), //one step every 2500 ms
NORMAL ( 125, 2, 1), //one step every 250 ms
FAST ( 50, 1, 2), //one step every 25 ms
SUPER_FAST( 25, 1, 10); //one step every 2.5 ms
/** The animation speed, expressed as an interval in milliseconds. */
public final int animationDelay;
/** For slower speeds, how many animation occur for every simulation step.
* Faster speeds should set this to one. */
public final int aniFramesPerStep;
/** For faster speeds, how many simulation steps should occur for every
* update to the screen. */
public final int simStepsPerUpdate;
private Speed(int delay, int aniFrames, int simSteps)
{
this.animationDelay = delay;
this.aniFramesPerStep = aniFrames;
this.simStepsPerUpdate = simSteps;
}
}