diff --git a/TODO.md b/TODO.md index aab6f16..ffa1855 100644 --- a/TODO.md +++ b/TODO.md @@ -1,14 +1,15 @@ MAJOR SHTUFF -1. Sandbox with all parameters exposed // exposed... but time to make the UI! -2. Repeated game with all parameters exposed -3. Splash, with params for cool outro -4. Integrate *everything*. // slides, outro -5. Credits and rewards +1. Create Sandbox +2. Re-create Repeated Game w/ params exposed +3. Re-create Splash, with cool outro +4. Integrate & Write EVERYTHING +5. Final round of playtesting +6. Credits, Footnotes, Rewards +7. Polish the whole dang thing MINOR SHTUFF - Word box class less annoying - Refactoring, ugh -- Logic: Prober, Pavlov, TF2T, Random? // done -- Slides in different files \ No newline at end of file +- Draw: Pavlov, TF2T, Random \ No newline at end of file diff --git a/assets/pavlov.png b/assets/pavlov.png new file mode 100644 index 0000000..0a00e6e Binary files /dev/null and b/assets/pavlov.png differ diff --git a/assets/random.png b/assets/random.png new file mode 100644 index 0000000..40911c6 Binary files /dev/null and b/assets/random.png differ diff --git a/assets/tf2t.png b/assets/tf2t.png new file mode 100644 index 0000000..2d0ccf5 Binary files /dev/null and b/assets/tf2t.png differ diff --git a/css/slides.css b/css/slides.css index 9246727..3c80b0a 100644 --- a/css/slides.css +++ b/css/slides.css @@ -44,17 +44,28 @@ body{ position: absolute; } +/********* Fader *********/ + .fader{ -webkit-transition: opacity 0.3s ease-in-out; -mos-transition: opacity 0.3s ease-in-out; -ms-transition: opacity 0.3s ease-in-out; transition: opacity 0.3s ease-in-out; } -.wordbox{ + +/******** Text Box ********/ + +.textbox{ font-family: 'FuturaHandwritten'; color: #333; font-size: 20px; } +.textbox > div{ + position: absolute; +} + +/********* Button ********/ + .button{ z-index: 0; } diff --git a/index.html b/index.html index 7b78f8a..476ed6e 100644 --- a/index.html +++ b/index.html @@ -16,6 +16,7 @@ + @@ -27,34 +28,41 @@ - + + + + + - \ No newline at end of file diff --git a/js/core/Button.js b/js/core/Button.js index 84a8831..2078343 100644 --- a/js/core/Button.js +++ b/js/core/Button.js @@ -24,7 +24,7 @@ function Button(config){ // Customize DOM button.style.left = config.x+"px"; button.style.top = config.y+"px"; - text.innerHTML = config.text; + text.innerHTML = Words.get(config.text_id); // On hover... hitbox.onmouseover = function(){ diff --git a/js/core/SlideSelect.js b/js/core/SlideSelect.js index b2abb15..18b7fe0 100644 --- a/js/core/SlideSelect.js +++ b/js/core/SlideSelect.js @@ -16,7 +16,7 @@ function SlideSelect(config){ }; // Populate dots - for(var i=0; i0){ // Testing phase - var move = moves.pop(); + var move = moves.shift(); return move; }else{ if(everCheatedMe){ diff --git a/js/sims/Tournament.js b/js/sims/Tournament.js index 39b23c1..fec21b5 100644 --- a/js/sims/Tournament.js +++ b/js/sims/Tournament.js @@ -1,12 +1,22 @@ Tournament.SELECTION = 5; -Tournament.NUM_TURNS = 5; +Tournament.NUM_TURNS = 20; // CREATE A RING OF AGENTS -Tournament.AGENTS = [ +/*Tournament.AGENTS = [ {strategy:"all_c", count:15}, {strategy:"all_d", count:5}, {strategy:"grim", count:0}, {strategy:"tft", count:5}, +];*/ +Tournament.AGENTS = [ + {strategy:"all_c", count:15}, + {strategy:"all_d", count:5}, + {strategy:"tft", count:5}, + //{strategy:"grim", count:3}, + //{strategy:"prober", count:3}, + //{strategy:"tf2t", count:13}, + //{strategy:"pavlov", count:13}, + //{strategy:"random", count:13} ]; function Tournament(config){ diff --git a/js/slides/Slides_Ecology.js b/js/slides/Slides_Ecology.js new file mode 100644 index 0000000..88f4451 --- /dev/null +++ b/js/slides/Slides_Ecology.js @@ -0,0 +1,39 @@ +SLIDES.push({ + + id: "sim", + add:[ + + // The tournament simulation + {id:"tournament", type:"Tournament", x:0, y:20}, + + // All the words! + { + id:"textbox", type:"TextBox", + boxes:[ + { x:500, y:0, width:460, height:50, text_id:"sandbox_1" }, + { x:500, y:370, width:460, height:200, text_id:"sandbox_2" } + ] + }, + + // Buttons + { + id:"_b1", type:"Button", x:500, y:150, width:140, + text_id: "label_play_tournament", + message: "tournament/play" + }, + { + id:"_b2", type:"Button", x:500, y:220, width:140, + text_id: "label_eliminate_bottom_5", + message: "tournament/eliminate", + active:false + }, + { + id:"_b3", type:"Button", x:500, y:290, width:140, + text_id: "label_reproduce_top_5", + message: "tournament/reproduce", + active:false + } + + ] + +}); \ No newline at end of file diff --git a/lang/en.html b/lang/en.html new file mode 100644 index 0000000..a269ae3 --- /dev/null +++ b/lang/en.html @@ -0,0 +1,32 @@ + + + +

+1) play tournament +

+ +

+2) eliminate bottom 5 +

+ +

+3) reproduce top 5 +

+ +

+Let's say there are three kinds of players: +
+Always Cooperate, +Always Cheat & +Tit For Tat +

+"What happens when you let a mixed population play against each other, and evolve over time? +

+ +

+Always Cheat dominates at first, but when it runs out of suckers to exploit, +its empire collapses – and the fairer Tit For Tat takes over. +

+We are not punished for our sins, but by them.
+- Elbert Hubbard +

\ No newline at end of file