This file contains 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 Calc1Parser; | |
enum Term { | |
Mul(a: Term, b: Int); | |
Div(a: Term, b: Int); | |
Term_Int(a: Int); | |
} | |
enum Expr { | |
Add(a: Expr, b: Term); |
This file contains 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 Calc1Parser; | |
enum Term { | |
Mul(a: Term, b: Int); | |
Div(a: Term, b: Int); | |
Term_Int(a: Int); | |
} | |
enum Expr { | |
Add(a: Expr, b: Term); |
This file contains 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
game.on_init do | |
scene_change :start_scene | |
end | |
scene :start_scene do |s| | |
s.on_init do | |
sp = s.sprite :position => [100, 100] #スプライトの作成と、表示位置の指定 | |
sp.set_color 255, 255, 255, 255 #スプライトの色を白(不透明)に設定 | |
sp.set_dest_size 50, 50 #スプライトの大きさを縦横50ピクセルに指定 | |
end |
This file contains 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 java.io.* | |
import java.awt.* | |
import java.awt.geom.* | |
import java.awt.image.* | |
import javax.imageio.* | |
(1..10).each{ | |
def img = ImageIO.read(new File("face_base.png")); | |
def gr = img.createGraphics(); |
This file contains 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 'dxruby' | |
Window.caption = "ウィンドウ" | |
Window.width = 640 | |
Window.height = 480 | |
Window.bgcolor = [255, 0, 0, 0] | |
image = Image.new( 50, 50, [255,255,255,255]) | |
Window.loop do | |
Window.draw(100, 100, image) |
This file contains 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
母艦の幅は640 | |
母艦の高さは480 | |
母艦のタイトルは「ウィンドウ」 | |
母艦のスタイルは「枠固定」 | |
母艦の最大化ボタン有効変更(オフに) | |
線太さは1 | |
線色は黒色 | |
塗り色は黒色 |
This file contains 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
prequire("common.lua"); | |
function OnLoad() | |
texture1 = createBlankGraphic(50,50); | |
fillGraphic(texture1,255,255,255,255); | |
end | |
function boot_OnStart() | |
setBGColor(0,0,0); | |
actor1 = createActor(texture1,50,50,0); |
This file contains 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
screen 0 , 640 , 480 , 0 | |
title "ウィンドウ" | |
cls 4 | |
color 255,255,255 | |
boxf 100, 100, 149, 149 |
This file contains 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 javaapplication1; | |
import javax.swing.JFrame; | |
import java.awt.*; | |
public class JavaApplication1{ | |
public static void main(String [] args) { | |
JFrame f = new JFrame("メインウィンドウ"); | |
f.setSize(640, 480); | |
f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); | |
f.add(new MyCanvas(),BorderLayout.CENTER); | |
f.setVisible(true); |