Skip to content

Instantly share code, notes, and snippets.

%w(
rspec-rails
).each do |pkg|
gem pkg, :group => [:development, :test]
end
%w(
capybara
spork
factory_girl_rails
%w(
rspec-rails
capybara
spork
factory_girl_rails
simplecov
).each do |pkg|
gem pkg, :group => :test
end
$ ->
game = new Main()
game.start()
#共通ライブラリ
#行列演算のための関数
##行列の和
addArray = (array1, array2) ->
array = []
len = array1.length
<!DOCTYPE HTML>
<html lang="ja">
<head>
<meta charset="UTF-8">
<script src="http://code.jquery.com/jquery-1.8.2.js"></script>
<script src="http://code.jquery.com/ui/1.9.1/jquery-ui.js"></script>
<script src="js/game.js"></script>
<link rel="stylesheet" href="css/game.css">
<title>shogi</title>
</head>
1 5 9
2 2 8
3 8 8
4 4 9
5 6 9
6 7 9
7 3 9
8 2 9
9 8 9
10 1 9
<div style="position: absolute; top: 140px; left: 232.5px; z-index: 1; display: block;" id="ui-datepicker-div" class="ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all">
<div class="ui-datepicker-header ui-widget-header ui-helper-clearfix ui-corner-all">
<a class="ui-datepicker-prev ui-corner-all" data-handler="prev" data-event="click" title="Prev">
<span class="ui-icon ui-icon-circle-triangle-w">
Prev</span>
</a>
<a class="ui-datepicker-next ui-corner-all" data-handler="next" data-event="click" title="Next">
<span class="ui-icon ui-icon-circle-triangle-e">
Next</span>
</a>
#宣言
enchant()
#定数
TANK_IMAGE = 'images/chara3.png'
BULLET_IMAGE = 'images/icon0.png'
MAP_TILES = 'images/map0.gif'
CRASH_IMAGE = 'images/effect0.png'
SHOT_SE = 'sounds/shot5.wav'
BOMB_SE = 'sounds/bomb2.wav'
#宣言
enchant()
#定数
TANK_IMAGE = 'images/chara3.png'
BULLET_IMAGE = 'images/icon0.png'
MAP_TILES = 'images/map0.gif'
CRASH_IMAGE = 'images/effect0.png'
SHOT_SE = 'sounds/shot5.wav'
BOMB_SE = 'sounds/bomb2.wav'
enchant();
var game, physicsWorld;
window.onload = function () {
game = new Game(320, 320);
game.fps = 30;
game.preload("chara1.gif", "icon1.png", "map2.gif");
game.onload = function () {
physicsWorld = new PhysicsWorld(0, 9.8);
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
<title>One Graph</title>
<script type="text/javascript" src="http://mbostock.github.com/d3/d3.v2.js"></script>
<script type="text/javascript" src="simple-graph.js"></script>
<style type="text/css">
body { font: 13px sans-serif; }
rect { fill: #fff; }