File: Cable.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 (20 lines) | stat: -rw-r--r-- 443 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#ifndef CABLE_H
#define CABLE_H

class Cable {
public:
	int c1, c2;		/*computers connected */
	int x1,y1,x2,y2;	/*endpoints of line representing cable */
	int x, y;		/*current location of spark*/
	float fx, fy;		/*needed for line drawing*/
	int delay;		/*how much time until spark leaves*/
	int active;		/*is spark moving and from which end*/
	int index;
	void setup();
	void draw();
	void update();
	onspark (int locx, int locy);

};

#endif