name | correct guesses | games together | ratio |
---|---|---|---|
yui | 0 | 4 | 0.000 |
kimapr | 0 | 4 | 0.000 |
LyricLy | 0 | 4 | 0.000 |
name | correct guesses | games together | ratio |
---|---|---|---|
LyricLy | 4 | 5 | 0.800 |
Dolphy | 2 | 4 | 0.500 |
yui | 1 | 4 | 0.250 |
kimapr | 1 | 4 | 0.250 |
submitted at
0 likes
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 | const WIDTH = 15; const HEIGHT = 5; function PosToX(pos) { return { x: pos % WIDTH, y: Math.floor(pos / WIDTH) }; } function GetScreen() { return document.getElementById("screen").innerHTML.replaceAll("<br>", ""); } let running = false; let playerPos = PosToX(GetScreen().indexOf("@")); function GoLeft() { document.getElementById("left").click(); playerPos.x -= 1; } function GoRight() { document.getElementById("right").click(); playerPos.x += 1; } function GoUp() { document.getElementById("up").click(); playerPos.y -= 1; } function GoDown() { document.getElementById("down").click(); playerPos.y += 1; } let reset = false; function Move() { if (running) return; running = true; let screen = GetScreen(); let foodPos = PosToX(screen.indexOf("+")); let bombPos = PosToX(screen.indexOf("*")); let moved = false; if (playerPos.x > foodPos.x) { // player is on the right if ((bombPos.y == playerPos.y) && (bombPos.x == playerPos.x - 1)) { if (foodPos.y > playerPos.y) { GoDown(); } else { GoUp(); } } GoLeft(); moved = true; } else if (playerPos.x < foodPos.x) { // player is on the left if ((bombPos.y == playerPos.y) && (bombPos.x == playerPos.x + 1)) { if (foodPos.y > playerPos.y) { GoDown(); } else { GoUp(); } } GoRight(); moved = true; } else if (playerPos.y > foodPos.y) { // player is below if ((bombPos.x == playerPos.x) && (bombPos.y == playerPos.y - 1)) { if (foodPos.x > playerPos.x) { GoRight(); } else { GoLeft(); } } GoUp(); moved = true; } else if (playerPos.y < foodPos.y) { // player is above if ((bombPos.x == playerPos.x) && (bombPos.y == playerPos.y + 1)) { if (foodPos.x > playerPos.x) { GoRight(); } else { GoLeft(); } } GoDown(); moved = true; } running = false; } window.setInterval(Move, 20); // window.setInterval(Move, 100); window.setInterval(function() { while (running) {} running = true; playerPos = PosToX(GetScreen().indexOf("@")); running = false; }, 1000); document.addEventListener("keydown", function(e) { console.log("key"); if (e.keyCode == 38) { GoUp(); } else if (e.keyCode == 40) { GoDown(); } else if (e.keyCode == 37) { GoLeft(); } else if (e.keyCode == 39) { GoRight(); } }); |
submitted at
1 like
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | /* Made by Linus Torvalds */ /* Pass an integer as the first argument to this program, or there will be consequences */ /* Consequences include: Terrible things */ /* I am writing these comments because I'm procrastinating */ /* You will not like the consequences */ #include <stdio.h> #include <stdlib.h> void PrintNumber(int num) { for (signed int i = 0; i < 32; ++ i) { if (num & (1 << i)) { printf("(1 << "); PrintNumber(i); printf(") + "); } } printf("0"); } int main(int argc, char** argv) { puts("Seatbelt"); int num = atoi(argv[1]); PrintNumber(num); puts(""); return 4; } |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | # Made by Linus Torvalds # Pass an integer as the first argument to this program, or there will be consequences # Consequences include: Terrible things # I am writing these comments because I'm procrastinating # You will not like the consequences include "cores/select.cal" include "std/io.cal" include "std/args.cal" include "std/conv.cal" func print_number cell num begin let cell i while i 32 < do if 1 i << num and then c"(1 << " print_str i print_number c") + " print_str end i ++ -> i end c"0" print_str end let Array arg 1 &arg get_arg &arg parse_int print_number new_line |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | // Made by Linus Torvalds // Pass an integer as the first argument to this program, or there will be consequences // Consequences include: Terrible things // I am writing these comments because I'm procrastinating // You will not like the consequences import std.conv; import std.stdio; void PrintNumber(int num) { for (int i = 0; i < 32; ++ i) { if (num & (1 << i)) { write("(1 << "); PrintNumber(i); write(") + "); } } write("0"); } void main(string[] args) { parse!int(args[1]).PrintNumber(); writeln(); } |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | ( FAILED ATTEMPT!!! Vorry ) : print_number ( num -- ) 0 do dup dup 1 swap lshift and if ." (1 << " dup recurse ." ) + " then 1 + dup 32 < while drop ." 0" ; 52 print_number |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | # Made by Linus Torvalds # Pass an integer as the first argument to this program, or there will be consequences # Consequences include: Terrible things # I am writing these comments because I'm procrastinating # You will not like the consequences import std/cmdline import std/strutils import std/strformat proc PrintNumber*(num: int) = for i in 0 ..< 32: if (num and (1 shl i)) != 0: stdout.write("(1 << ") PrintNumber(i) stdout.write(") + ") stdout.write("0") PrintNumber(parseInt(commandLineParams()[0])) echo() |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | # Made by Linus Torvalds # WPL has no cmd parameters, so the value is hard coded in this program. Vorry :vob: (printNumber = ([num] => { (i = 0) ; ({i < 32} @ { ((num & (1 << i)) ? { (stdout .s "(1 << ") ; (printNumber ! [i]) ; (stdout .s ") + ") }) ; (i = (i + 1)) }) ; (stdout .s "0") })) ; (printNumber ! [52]) ; (stdout .s "\n") |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | # Failed attempt, vorry # Made by Linus Torvalds # YSL has no cmd parameters, so the value is hard coded in this program. Vorry :vob: goto *main print_number: var num p var i = 0 .loop: l_shift 1 $i var bitWith from return bit_and $num $bitWith var value from return cmp $value 0 goto_if *.next print "(1 << " gosub *print_number $i print ") + " .next: var i += 1 lt $i 32 goto_if *.loop print "0" return main: gosub *print_number 52 println |
submitted at
0 likes
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | from sortedcontainers import SortedDict buffer = SortedDict({}) while True: inp = input(">> ") parts = inp.split(" ") if len(parts) == 0: continue if parts[0].isnumeric(): num = int(parts[0]) buffer[num] = " ".join(parts[1:]) elif parts[0] == "list": for key in buffer.keys(): print(f"{key}: {buffer[key]}") elif parts[0] == "save": file = open(parts[1], "w") for key in buffer.keys(): file.write(buffer[key] + "\n") print("saved") elif parts[0] == "open": file = open(parts[1], "r") lineNum = 10 for line in file: buffer[lineNum] = line.rstrip() lineNum += 10 else: print(f"Unknown command {parts[0]}") |
submitted at
1 like
1 | curl https://cg.esolangs.gay/58/ | tail -n 24 | head -n 11 |
submitted at
0 likes
1 2 | import std; void main() => readln.chomp.length.writeln; |
post a comment