File: Network.h

package info (click to toggle)
xbill 2.0-9
  • links: PTS
  • area: main
  • in suites: slink
  • size: 528 kB
  • ctags: 339
  • sloc: cpp: 1,803; makefile: 38; sh: 21
file content (27 lines) | stat: -rw-r--r-- 699 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#ifndef NETWORK_H
#define NETWORK_H

#include "Computer.h"
#include "Cable.h"

class Network {	/*structure for global network of computers*/
public:
	static const int MAX_COMPUTERS = 20;	/* max computers on screen */
	static const int NUM_SYS = 6;		/* number of computer types */
	Picture pictures[NUM_SYS+1];		/* array of cpu pictures */
	int width, height;			/* size of cpu picture */
	int units;				/* number of cpus in network */
	int win, base, off;			/* number in each state */
	Computer computers[MAX_COMPUTERS];	/* array of cpu info */
	Cable cables[MAX_COMPUTERS];
	int ncables;
	void setup();
	void load_pix();
	void draw();
	void update();
	void toasters();
	int on(int lev);

};

#endif