001package myproject.model;
002
003/**
004 * A light has a boolean state.
005 */
006public class Light implements Agent {
007        Light() { } // Created only by this package
008
009        private boolean state;
010
011        public boolean getState() {
012                return state;
013        }
014        public void run(double time) {
015                if (time%40==0) {
016                        state = !state;
017                }
018        }
019}
020