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
| function rxuG() | |
| { | |
| var KkNoAR = "YkuOKC7i{\"GUy%x"; | |
| return KkNoAR; | |
| } |
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
| Square = 6 | |
| is_used = Array.new(Square + 1) {Array.new(Square + 1) {[false, false]}} | |
| count = 0 | |
| route = lambda do |x, y, is_first_time| | |
| if x == Square and y == Square | |
| if is_first_time | |
| route.call(0, 0, false) | |
| else | |
| count += 1 |
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
| #http://obelisk.hatenablog.com/entry/2017/12/01/041951 | |
| #B1リットル: 空(0), 入れる(1), B1→B2に移す(2) | |
| #B2リットル: 空(3), 入れる(4), B2→B1に移す(5) | |
| B1, B2 = 8, 5 | |
| TO = 1 | |
| def move(mass, f, t) | |
| if (a = mass - t) >= f | |
| t += f |
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
| require 'gosu' | |
| require 'rmagick' | |
| require 'chipmunk' | |
| Width, Height = 600, 600 | |
| Wall_h = 20 | |
| class MyWindow < Gosu::Window | |
| def initialize | |
| super Width, Height, false |
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
| require 'oekaki' | |
| Width, Height = 500, 450 | |
| Oekaki.app width: Width, height: Height, title: "Sierpinski gasket" do | |
| draw do | |
| clear | |
| x1, y1 = Width / 2, Height - Width * 0.5 * Math.sqrt(3) | |
| x2, y2 = 0, Height |
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
| require 'bundler/setup' | |
| require 'gosu' | |
| require 'rmagick' | |
| require 'chipmunk' | |
| CV = CP::Vec2 | |
| Width, Height = 300, 300 | |
| Wall_h = 50 |
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
| require 'oekaki' | |
| require_relative 'turtle' | |
| Width, Height = 600, 400 | |
| Oekaki.app width: Width, height: Height, title: "C curve" do | |
| draw do | |
| clear | |
| t = Turtle.new(Width, Height, self) |
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
| require 'oekaki' | |
| require_relative 'turtle' | |
| Width, Height = 600, 600 | |
| Oekaki.app width: Width, height: Height, title: "Sierpinski curve" do | |
| draw do | |
| clear | |
| depth = 5 |
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
| require 'oekaki' | |
| require_relative 'turtle' | |
| Width, Height = 600, 600 | |
| Oekaki.app width: Width, height: Height, title: "Koch curve" do | |
| draw do | |
| clear | |
| l = 500 |
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
| require 'oekaki' | |
| require_relative 'turtle' | |
| Width, Height = 600, 600 | |
| Oekaki.app width: Width, height: Height, title: "Hilbert curve" do | |
| draw do | |
| clear | |
| depth = 5 |