Team:TU Eindhoven/the game

From 2014.igem.org

(Difference between revisions)
Line 40: Line 40:
// The next line is needed if running in JavaScript Mode with Processing.js
// The next line is needed if running in JavaScript Mode with Processing.js
/* @pjs preload="http://i.imgur.com/gDccyRX.png, http://i.imgur.com/V6756WQ.png, http://i.imgur.com/qmz6Tqx.png, http://i.imgur.com/kTG3cjw.png, http://i.imgur.com/rXLfh0n.png, http://i.imgur.com/DF3iOQN.png, http://i.imgur.com/HsgqFiR.png, http://i.imgur.com/yt3xRrC.png, http://i.imgur.com/oqpG7r6.png, http://i.imgur.com/tVs8PA3.png, http://i.imgur.com/8TgXchE.png, http://i.imgur.com/k2JxEjl.png, http://i.imgur.com/87sB8SH.png, http://i.imgur.com/vWEOnlj.png, http://i.imgur.com/sua0hIH.png, http://i.imgur.com/o2V20If.png, http://i.imgur.com/V2v8JpM.png, http://i.imgur.com/7VmOmW1.png, http://i.imgur.com/NW22Blc.png, http://i.imgur.com/9uJagVU.png, http://i.imgur.com/C7xi9eF.png, http://i.imgur.com/V8Tyv9D.png, http://i.imgur.com/14eMBR8.png, http://i.imgur.com/rKe6hVf.png, http://i.imgur.com/i9jxTsO.png, http://i.imgur.com/i9jxTsO.png, http://i.imgur.com/EY7xXur.png, http://i.imgur.com/qiWx2fF.png, http://i.imgur.com/2YUI7lW.png, http://i.imgur.com/KQ0ZyBA.png, http://i.imgur.com/ermi0iK.png, http://i.imgur.com/EKrOZM8.png, http://i.imgur.com/8VAJ6Bt.png, http://i.imgur.com/t2kTiPr.png, http://i.imgur.com/UmJRy3m.png, http://i.imgur.com/nkWwyFH.png, http://i.imgur.com/klMOhVr.png, http://i.imgur.com/CfREnca.png, http://i.imgur.com/1Sk2HSE.png, http://i.imgur.com/ymhoulY.png, http://i.imgur.com/G7MdUHm.png, http://i.imgur.com/P5kUXSf.png, http://i.imgur.com/oW2kyrW.png, http://i.imgur.com/wrpjZ1g.png, http://i.imgur.com/oi4cINP.png, http://i.imgur.com/wyzfNAg.jpg"; */
/* @pjs preload="http://i.imgur.com/gDccyRX.png, http://i.imgur.com/V6756WQ.png, http://i.imgur.com/qmz6Tqx.png, http://i.imgur.com/kTG3cjw.png, http://i.imgur.com/rXLfh0n.png, http://i.imgur.com/DF3iOQN.png, http://i.imgur.com/HsgqFiR.png, http://i.imgur.com/yt3xRrC.png, http://i.imgur.com/oqpG7r6.png, http://i.imgur.com/tVs8PA3.png, http://i.imgur.com/8TgXchE.png, http://i.imgur.com/k2JxEjl.png, http://i.imgur.com/87sB8SH.png, http://i.imgur.com/vWEOnlj.png, http://i.imgur.com/sua0hIH.png, http://i.imgur.com/o2V20If.png, http://i.imgur.com/V2v8JpM.png, http://i.imgur.com/7VmOmW1.png, http://i.imgur.com/NW22Blc.png, http://i.imgur.com/9uJagVU.png, http://i.imgur.com/C7xi9eF.png, http://i.imgur.com/V8Tyv9D.png, http://i.imgur.com/14eMBR8.png, http://i.imgur.com/rKe6hVf.png, http://i.imgur.com/i9jxTsO.png, http://i.imgur.com/i9jxTsO.png, http://i.imgur.com/EY7xXur.png, http://i.imgur.com/qiWx2fF.png, http://i.imgur.com/2YUI7lW.png, http://i.imgur.com/KQ0ZyBA.png, http://i.imgur.com/ermi0iK.png, http://i.imgur.com/EKrOZM8.png, http://i.imgur.com/8VAJ6Bt.png, http://i.imgur.com/t2kTiPr.png, http://i.imgur.com/UmJRy3m.png, http://i.imgur.com/nkWwyFH.png, http://i.imgur.com/klMOhVr.png, http://i.imgur.com/CfREnca.png, http://i.imgur.com/1Sk2HSE.png, http://i.imgur.com/ymhoulY.png, http://i.imgur.com/G7MdUHm.png, http://i.imgur.com/P5kUXSf.png, http://i.imgur.com/oW2kyrW.png, http://i.imgur.com/wrpjZ1g.png, http://i.imgur.com/oi4cINP.png, http://i.imgur.com/wyzfNAg.jpg"; */
 +
int numberOfDNA;
 +
DNAPiece[] dna;
 +
 +
//DNAPiece's
 +
 +
PImage img_gfp;
 +
String name_gfp = "Green fluorescent protein";
 +
 +
PImage img_t7;
 +
String name_t7 = "promotor T7";
 +
 +
PImage img_terminator;
 +
String name_terminator = "Terminator";
 +
 +
PImage img_antibiores;
 +
String name_antibiores = "Antibiotic resistant";
 +
 +
PImage img_tntP;
 +
String name_tntP = "promotor TNT";
 +
 +
PImage img_o2;
 +
String name_o2 = "Oxygen Promotor";
 +
 +
PImage img_display;
 +
String name_display = "Display Protein";
 +
 +
PImage img_linker;
 +
String name_linker = "Linker";
 +
 +
PImage img_mri;
 +
String name_mri = "MRI-protein";
 +
 +
PImage img_keke;
 +
String name_keke = "Zwitter ion";
 +
 +
PImage img_inhi;
 +
String name_inhi = "Inhibitor";
 +
 +
//down here two more image's are made whith are the same every time
 +
PImage handInDNA;
 +
PImage info;
 +
//this integer (pieceOfDNAForUse) is set on two. That means the first two DNA piece are available right from the start.
 +
int pieceOfDNAForUse = 2;
 +
 +
//image's for levels
 +
 +
PImage wellDone;
 +
PImage toBad;
 +
//LEVEL 1
 +
PImage level1_1;
 +
PImage logo1_1;
 +
//PImage wellDone1_1;
 +
//PImage toBad1_1;
 +
 +
PImage level1_2;
 +
PImage logo1_2;
 +
//PImage wellDone1_2;
 +
//PImage toBad1_2;
 +
 +
PImage level1_3;
 +
PImage logo1_3;
 +
//PImage wellDone1_2;
 +
//PImage toBad1_2;
 +
 +
PImage logo1_max;
 +
 +
//LEVEL 2
 +
PImage level2_1;
 +
PImage logo2_1;
 +
//PImage wellDone2_1;
 +
//PImage toBad2_1;
 +
 +
PImage level2_2;
 +
PImage logo2_2;
 +
//PImage wellDone2_2;
 +
//PImage toBad2_2;
 +
 +
PImage logo2_max;
 +
 +
PImage background;
 +
 +
 +
//levels
 +
MasterLevel[] theRealLevels;
 +
SubLevel[] level1;
 +
SubLevel[] level2;
 +
 +
//every level has a strain whith it want to pass. You add them over here (use the name_ String so you can change the name of DNA piece at one point in the code)
 +
String[] eis1_1 = {name_gfp, name_terminator};
 +
String[] eis1_2 = {name_t7, name_gfp, name_terminator};
 +
String[] eis1_3 = {name_t7, name_gfp, name_terminator, name_antibiores};
 +
String[] eis2_1 = {name_tntP, name_gfp, name_terminator, name_antibiores};
 +
String[] eis2_2 = {name_o2, name_gfp, name_terminator, name_antibiores};
 +
String[] eis3_1 = {name_t7, name_gfp, name_terminator, name_antibiores};
 +
String[] eis3_2a = {name_o2, name_inhi, name_terminator, name_antibiores};
 +
String[] eis3_2b = {name_t7, name_mri, name_terminator, name_antibiores};
 +
String[] eis3_3 = {name_t7, name_display, name_linker, name_keke, name_terminator, name_antibiores};
 +
String[] empty = {};
 +
 +
//making of the items you can pick up with you mouse
 +
Plasmide plasmide1;
 +
Plasmide plasmide2;
 +
boolean secondPlas = false;
 +
 +
//Image's of infoBoards
 +
PImage infoBoard[];
 +
 +
//left side
 +
int stripLeft = 160;
 +
 +
//right side
 +
int stripRight = 80;
 +
PImage binOn;
 +
PImage binOff;
 +
Button bin;
 +
 +
PImage helpOn;
 +
PImage helpOff;
 +
Button helpButton;
 +
int currentHelpScreen = 1;
 +
int maxNumberOfHelpScreens = 3;
 +
PImage[] helpScreen;
 +
 +
 +
//remaining
 +
int itemOnMouse;
 +
boolean somethingOnMouse;
 +
int infoNumber =0;
 +
int level = 0;
 +
boolean thereIsInfoToShow = true;
PImage img;  // Declare variable "a" of type PImage
PImage img;  // Declare variable "a" of type PImage

Revision as of 14:18, 17 July 2014

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> Clock \ Examples \ Processing.org

 

AAAAAAAA