This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <iostream> | |
| #include <vector> | |
| #include <algorithm> | |
| #include <cstdint> | |
| using namespace std; | |
| using Digit = uint8_t; | |
| using BigInt = vector<Digit>; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import math | |
| SQRT_5 = math.sqrt(5) | |
| PHI1 = (0.5, 0.5) | |
| PHI2 = (0.5, -0.5) | |
| def s5n_sub(s5n_1, s5n_2): | |
| (a, b) = s5n_1 | |
| (c, d) = s5n_2 | |
| return (a - c, b - d) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| if ARGV.length == 0 | |
| puts "Usage: ruby esc.rb [filename]" | |
| exit | |
| end | |
| prog = File.read ARGV[0] | |
| prog = prog.gsub(/auto/, "automático") | |
| prog = prog.gsub(/const/, "constante") | |
| prog = prog.gsub(/double/, "doble"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| javaFiles = Dir.glob "#{ARGV[0]}/**/*.java" | |
| javaFiles.each do |javaFile| | |
| javaCode = File.read javaFile | |
| javaCode = javaCode.gsub /l|cl/, "" | |
| File.open(javaFile, "w") {|file| file.puts javaCode} | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #ifndef Event_hpp | |
| #define Event_hpp | |
| #include <vector> | |
| #include <functional> | |
| class Event; | |
| typedef std::function<void(Event*)> EventHandler; | |
| class Event { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include "Event.hpp" | |
| void Event::doEvent() { | |
| for (int i = 0; i < handlers.size(); i++) { | |
| handlers.at(i)->handle(this); | |
| } | |
| if (!cancelled) { | |
| execute(); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package leo.sortorsplode; | |
| import com.badlogic.gdx.Gdx; | |
| import com.badlogic.gdx.Screen; | |
| import com.badlogic.gdx.graphics.glutils.ShapeRenderer; | |
| public class TransitionScreen implements Screen { | |
| private Screen currentScreen; | |
| private Screen nextScreen; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Set of default scores used to quickly debug without typing in scores every time. | |
| # Scores taken from the booklet PDF. | |
| defaultScores = {"A": [6, 9, 9, 10, 5], | |
| "B": [7, 6, 8, 5, 4], | |
| "C": [9, 5, 4, 7, 8], | |
| "D": [5, 6, 9, 7, 6], | |
| "E": [5, 6, 9, 7, 6], | |
| "F": [6, 4, 7, 8, 7] | |
| } |
NewerOlder