Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
M
mycard
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
xiaoye
mycard
Commits
27db3c0b
Commit
27db3c0b
authored
Dec 21, 2011
by
神楽坂玲奈
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rakefile
parent
aa607677
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
61 additions
and
5 deletions
+61
-5
.gitignore
.gitignore
+8
-0
Rakefile
Rakefile
+41
-0
clean.cmd
clean.cmd
+0
-5
lib/main.rb
lib/main.rb
+10
-0
lib/room.rb
lib/room.rb
+1
-0
mycard.cmd
mycard.cmd
+1
-0
No files found.
.gitignore
0 → 100644
View file @
27db3c0b
/nbproject/
/ruby/
/pkg/
/log.log
/err.log
/replay/*
/graphics/avatars/*_*.png
Thumbs.db
\ No newline at end of file
Rakefile
0 → 100644
View file @
27db3c0b
require
'rubygems'
require
'rake'
require
'rake/clean'
require
'rake/gempackagetask'
#require 'rake/rdoctask'
#require 'rake/testtask'
Windows
=
RUBY_PLATFORM
[
"mingw"
]
||
RUBY_PLATFORM
[
"mswin"
]
spec
=
Gem
::
Specification
.
new
do
|
s
|
s
.
name
=
'mycard'
s
.
version
=
'0.1'
s
.
extra_rdoc_files
=
[
'README.txt'
,
'LICENSE.txt'
]
s
.
summary
=
'a card game'
s
.
description
=
s
.
summary
s
.
author
=
'zh99998'
s
.
email
=
'zh99998@gmail.com'
s
.
homepage
=
'http://card.touhou,cc'
# s.executables = ['your_executable_here']
s
.
files
=
%w(LICENSE.txt README.txt config.yml replay)
+
Dir
.
glob
(
"{lib,audio,data,fonts,graphics}/**/*"
)
if
Windows
s
.
files
+=
%w(mycard.cmd)
+
Dir
.
glob
(
"{ruby}/**/*"
)
else
s
.
files
+=
%w(mycard.sh)
+
Dir
.
glob
(
"{ruby}/**/*"
)
end
s
.
require_path
=
"lib"
#s.bindir = "bin"
end
Rake
::
GemPackageTask
.
new
(
spec
)
do
|
p
|
p
.
gem_spec
=
spec
if
Windows
p
.
need_zip
=
true
p
.
zip_command
=
'7z a -tzip'
else
p
.
need_tar
=
true
end
end
CLOBBER
.
include
%w(log.log err.log)
+
Dir
.
glob
(
"{replay}/**/*"
)
+
Dir
.
glob
(
"**/Thumbs.db"
)
+
Dir
.
glob
(
"graphics/avatars/*_*.png"
)
\ No newline at end of file
clean.cmd
deleted
100644 → 0
View file @
aa607677
cd
/d
%~dp0
del
graphics
\avatars\
*
_
*
.png
del
Thumbs
.db
/s /F /A
:S
del
log
.txt
del
err
.txt
\ No newline at end of file
lib/main.rb
View file @
27db3c0b
#encoding: UTF-8
#encoding: UTF-8
#仅用于调试,发布时删
alias
gbk_puts
puts
def
puts
(
*
args
)
gbk_puts
(
*
(
args
.
collect
{
|
item
|
item
.
encode
"GBK"
,
:invalid
=>
:replace
,
:undef
=>
:replace
}))
end
def
p
(
*
args
)
print
(
args
.
collect
{
|
item
|
item
.
inspect
.
encode
"GBK"
,
:invalid
=>
:replace
,
:undef
=>
:replace
}.
join
(
"
\n
"
)
+
"
\n
"
)
rescue
print
(
args
.
join
(
"
\n
"
)
+
"
\n
"
)
end
def
filesize_inspect
(
size
)
def
filesize_inspect
(
size
)
case
size
case
size
when
0
...
1024
when
0
...
1024
...
...
lib/room.rb
View file @
27db3c0b
#encoding: UTF-8
class
Room
class
Room
Color
=
[[
0
,
0
,
0
],
[
255
,
0
,
0
],
[
0
,
255
,
0
],
[
0
,
0
,
255
],
[
255
,
165
,
0
]]
Color
=
[[
0
,
0
,
0
],
[
255
,
0
,
0
],
[
0
,
255
,
0
],
[
0
,
0
,
255
],
[
255
,
165
,
0
]]
extend
Cacheable
extend
Cacheable
...
...
mycard.cmd
View file @
27db3c0b
@echo
off
cd
/d
%~dp0
cd
/d
%~dp0
echo
------------------
>>
log
.log
echo
------------------
>>
log
.log
echo
------------------
>>
err
.log
echo
------------------
>>
err
.log
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment