コード例 #1
0
ファイル: Worm.cpp プロジェクト: moondriver/CSE101
bool canReachBed(int n, int s1, int s2, int d1, int d2, std::list<int> o) {
	Graph<tile> g;
	set_graph(g, n);

	set_food(g, o, n);
	tile start; start.insert(s1); start.insert(s2);
	explore(g, start);

	tile end; end.insert(d1); end.insert(d2);
	return g.vertices[end]->visited;
}
コード例 #2
0
int main()
{
	// Exit if not EGA or VGA
	// Find out if they have what it takes
	if (set_graph() != 1) {
		cout << "This program requires EGA or VGA graphics\n";
		exit(0);
	}
	calc_coords();       // Scale to graphics resolution in use
	draw_planets();      // Sun through Uranus 
	get_key();           // Display message and wait for key press
	closegraph();        // Close graphics system

	return 0;
}
コード例 #3
0
ファイル: HR.C プロジェクト: hex-ci/Hyper-Reader
void main(int argc,char *argv[])
{ARGC=argc;
 CMD=argv[0];
 if (ARGC>1)
  ARGV=argv[1];
 else
  ARGV=NULL;
 HyperReader_init();
 set_graph();
 while (1)
 {page0=ftell(story_file);
  read_story(story);
  page1=ftell(story_file);
  print(story,xx,yy);
  bof_eof();
  wait();
  clear();
 }
}