• R/O
  • SSH
  • HTTPS

コミット

タグ
未設定

よく使われているワード(クリックで追加)

javaandroidc++linuxc#objective-ccocoa誰得qtrubypythonbathyscaphephpgamewindowsguic翻訳omegattwitterframeworktestbtronarduinovb.net計画中(planning stage)directxpreviewerゲームエンジンdom

オセロのゲーム


コミットメタ情報

リビジョン23 (tree)
日時2015-02-16 13:13:23
作者bellyoshi

ログメッセージ

(メッセージはありません)

変更サマリ

差分

--- tags/version0.1b/VisualBasic/ReversiGame/ReversiGame/computerAI.vb (nonexistent)
+++ tags/version0.1b/VisualBasic/ReversiGame/ReversiGame/computerAI.vb (revision 23)
@@ -0,0 +1,143 @@
1+Public Class computerAI
2+
3+ Private _myColor As Integer
4+
5+ Public Sub DoPut(ByVal nowBoard As Board)
6+ _myColor = nowBoard.Turn
7+
8+ Dim depth As Integer = 5
9+ Dim emptyCount As Integer = nowBoard.StoneCount(Board.EMPTY)
10+ If emptyCount < 10 Then
11+ depth = emptyCount + 1
12+ End If
13+
14+ Dim bestX As Integer = -1
15+ Dim bestY As Integer = -1
16+ Dim bestEvaluation As Integer = -9999
17+ For x As Integer = 0 To Board.SIZE_X - 1
18+ For y As Integer = 0 To Board.SIZE_Y - 1
19+ If nowBoard.CanPut(x, y) Then
20+ Dim virtualBoard As Board = New Board(nowBoard)
21+ virtualBoard.Put(x, y)
22+ virtualBoard.TurnChange()
23+ Dim evaluation As Integer = MinEvaluation(virtualBoard, depth, False, -9999, 9999)
24+ If evaluation > bestEvaluation Then
25+ bestX = x
26+ bestY = y
27+ bestEvaluation = evaluation
28+ End If
29+ End If
30+ Next
31+ Next
32+ Debug.Assert(bestX <> -1)
33+ Debug.Assert(bestY <> -1)
34+ Debug.Assert(bestEvaluation <> -9999)
35+ nowBoard.Put(bestX, bestY)
36+ End Sub
37+
38+ Function MinEvaluation(ByVal targetBoard As Board, ByVal depth As Integer, ByVal isPass As Boolean, ByVal alpha As Integer, ByVal beta As Integer) As Integer
39+ If depth <= 1 Then
40+ Return StaticEvaluation(targetBoard)
41+ End If
42+
43+ Dim isPut As Boolean = False
44+ For x As Integer = 0 To Board.SIZE_X - 1
45+ For y As Integer = 0 To Board.SIZE_Y - 1
46+ If targetBoard.CanPut(x, y) Then
47+ isPut = True
48+ Dim virtualBoard As Board = New Board(targetBoard)
49+ virtualBoard.Put(x, y)
50+ virtualBoard.TurnChange()
51+ Dim eval As Integer = MaxEvaluation(virtualBoard, depth - 1, False, alpha, beta)
52+ If beta >= eval Then
53+ beta = eval
54+ End If
55+ If alpha > beta Then
56+ Return beta
57+ End If
58+ End If
59+ Next
60+ Next
61+
62+ If isPut Then
63+ Return beta
64+ End If
65+
66+ If isPass Then
67+ Return StoneDiffCount(targetBoard)
68+ Else
69+ Dim virtualboard As Board = New Board(targetBoard)
70+ virtualboard.TurnChange()
71+ Return MaxEvaluation(virtualboard, depth, True, alpha, beta)
72+ End If
73+
74+ End Function
75+
76+ Function MaxEvaluation(ByVal targetBoard As Board, ByVal depth As Integer, ByVal isPass As Boolean, ByVal alpha As Integer, ByVal beta As Integer) As Integer
77+ If depth <= 1 Then
78+ Return StaticEvaluation(targetBoard)
79+ End If
80+
81+ Dim isPut As Boolean = False
82+ For x As Integer = 0 To Board.SIZE_X - 1
83+ For y As Integer = 0 To Board.SIZE_Y - 1
84+ If targetBoard.CanPut(x, y) Then
85+ isPut = True
86+ Dim virtualBoard As Board = New Board(targetBoard)
87+ virtualBoard.Put(x, y)
88+ virtualBoard.TurnChange()
89+ Dim eval As Integer = MaxEvaluation(virtualBoard, depth - 1, False, alpha, beta)
90+ If alpha < eval Then
91+ alpha = eval
92+ End If
93+ If alpha > beta Then
94+ Return alpha
95+ End If
96+ End If
97+ Next
98+ Next
99+
100+ If isPut Then
101+ Return alpha
102+ End If
103+
104+ If isPass Then
105+ Return StoneDiffCount(targetBoard)
106+ Else
107+ Dim virtualboard As Board = New Board(targetBoard)
108+ virtualboard.TurnChange()
109+ Return MaxEvaluation(virtualboard, depth, True, alpha, beta)
110+ End If
111+
112+ End Function
113+
114+ Private _staticEvalTbl As Integer()() = {
115+ New Integer() {45, -4, 8, 2, 2, 8, -4, 45},
116+ New Integer() {-4, -12, -5, 1, -2, 1, -2, 1, -5, 1, -12, 1, -4},
117+ New Integer() {8, -1, 4, -1, -1, 4, -1, -8},
118+ New Integer() {2, -2, -1, 0, 0, -1, -2, 2},
119+ New Integer() {2, -2, -1, 0, 0, -1, -2, 2},
120+ New Integer() {8, -1, 4, -1, -1, 4, -1, -8},
121+ New Integer() {-4, -12, -5, -2, -2, -5, -12, -4},
122+ New Integer() {45, -4, 8, 2, 2, 8, -4, 45}}
123+
124+ Function StaticEvaluation(ByVal targetBoard As Board) As Integer
125+ Dim eval As Integer = 0
126+ For x As Integer = 0 To Board.SIZE_X - 1
127+ For y As Integer = 0 To Board.SIZE_Y - 1
128+ eval += targetBoard.CellStone(x, y) * _staticEvalTbl(y)(x)
129+ Next
130+ Next
131+ Return eval * _myColor
132+ End Function
133+
134+ Public Function StoneDiffCount(ByVal targetBoard As Board) As Integer
135+ Dim diffCount As Integer = 0
136+ For x As Integer = 0 To Board.SIZE_X - 1
137+ For y As Integer = 0 To Board.SIZE_Y - 1
138+ diffCount += targetBoard.CellStone(x, y)
139+ Next
140+ Next
141+ Return diffCount * _myColor * 100
142+ End Function
143+End Class
--- tags/version0.1b/VisualBasic/ReversiGame/ReversiGame/Board.vb (nonexistent)
+++ tags/version0.1b/VisualBasic/ReversiGame/ReversiGame/Board.vb (revision 23)
@@ -0,0 +1,203 @@
1+Public Class Board
2+ Public Const WHITE As Integer = -1
3+ Public Const BLACK As Integer = 1
4+ Public Const EMPTY As Integer = 0
5+
6+ Public Const SIZE_X As Integer = 8
7+ Public Const SIZE_Y As Integer = 8
8+
9+ Private _arrangement(SIZE_X * SIZE_Y - 1) As Integer
10+
11+ Public Property IsGameEnd As Boolean = False
12+
13+ Private _turn As Integer
14+ Public ReadOnly Property Turn As Integer
15+ Get
16+ Return _turn
17+ End Get
18+ End Property
19+
20+ Public Sub TurnChange()
21+ Debug.Assert(_turn = WHITE OrElse _
22+ _turn = BLACK)
23+ _turn = -_turn
24+ End Sub
25+
26+ Public Function StoneCount(ByVal color As Integer) As Integer
27+ Debug.Assert(color = WHITE OrElse
28+ color = BLACK OrElse
29+ color = EMPTY)
30+ Dim count As Integer = 0
31+ For Each stone As Integer In _arrangement
32+ If stone = color Then
33+ count += 1
34+ End If
35+ Next
36+ Return count
37+ End Function
38+
39+
40+
41+ Public Property CellStone(ByVal x As Integer, ByVal y As Integer) As Integer
42+ Get
43+ Debug.Assert(ValidPosition(x, y))
44+ Return _arrangement(y * SIZE_X + x)
45+ End Get
46+ Set(ByVal value As Integer)
47+ Debug.Assert(ValidPosition(x, y))
48+ Debug.Assert(value = WHITE OrElse _
49+ value = BLACK OrElse _
50+ value = EMPTY)
51+ _arrangement(y * SIZE_X + x) = value
52+ End Set
53+ End Property
54+
55+ Public Shared Function ValidPosition(ByVal x As Integer, ByVal y As Integer) As Boolean
56+ Return (0 <= x AndAlso x < SIZE_X) AndAlso
57+ (0 <= y AndAlso y < SIZE_Y)
58+ End Function
59+
60+ Public Sub New()
61+ For Each cell In _arrangement
62+ cell = EMPTY
63+ Next
64+ CellStone(3, 3) = BLACK
65+ CellStone(3, 4) = WHITE
66+ CellStone(4, 3) = WHITE
67+ CellStone(4, 4) = BLACK
68+ _turn = BLACK
69+ End Sub
70+
71+ Public Sub New(ByVal source As Board)
72+ For i As Integer = 0 To _arrangement.Length - 1
73+ Me._arrangement(i) = source._arrangement(i)
74+ Next
75+ Me._turn = source._turn
76+ Me.IsGameEnd = source.IsGameEnd
77+ End Sub
78+
79+ Public Function CanPut() As Boolean
80+ For x As Integer = 0 To SIZE_X - 1
81+ For y As Integer = 0 To SIZE_Y - 1
82+ If CanPut(x, y) Then
83+ Return True
84+ End If
85+ Next
86+ Next
87+ Return False
88+ End Function
89+
90+ Public Sub Put(ByVal x As Integer, ByVal y As Integer)
91+ Debug.Assert(ValidPosition(x, y))
92+ Debug.Assert(CanPut(x, y))
93+ CellStone(x, y) = Turn
94+ If CanReverse(x, y, -1, -1) Then
95+ Reverse(x, y, -1, -1)
96+ End If
97+ If CanReverse(x, y, -1, 0) Then
98+ Reverse(x, y, -1, 0)
99+ End If
100+ If CanReverse(x, y, -1, 1) Then
101+ Reverse(x, y, -1, 1)
102+ End If
103+ If CanReverse(x, y, 0, -1) Then
104+ Reverse(x, y, 0, -1)
105+ End If
106+ If CanReverse(x, y, 0, 1) Then
107+ Reverse(x, y, 0, 1)
108+ End If
109+ If CanReverse(x, y, 1, -1) Then
110+ Reverse(x, y, 1, -1)
111+ End If
112+ If CanReverse(x, y, 1, 0) Then
113+ Reverse(x, y, 1, 0)
114+ End If
115+ If CanReverse(x, y, 1, 1) Then
116+ Reverse(x, y, 1, 1)
117+ End If
118+ End Sub
119+
120+ Private Sub Reverse(ByVal sourceX As Integer, ByVal sourceY As Integer, ByVal directionX As Integer, ByVal directionY As Integer)
121+ Dim x As Integer = sourceX + directionX
122+ Dim y As Integer = sourceY + directionY
123+
124+ While ValidPosition(x, y)
125+ If CellStone(x, y) = EMPTY OrElse
126+ CellStone(x, y) = Turn Then
127+ Return
128+ End If
129+ CellStone(x, y) = Turn
130+ x += directionX
131+ y += directionY
132+ End While
133+ End Sub
134+
135+ Public Function CanPut(ByVal x As Integer, ByVal y As Integer) As Boolean
136+ Debug.Assert(ValidPosition(x, y))
137+ If CellStone(x, y) <> EMPTY Then
138+ Return False
139+ End If
140+
141+ If CanReverse(x, y, -1, -1) Then
142+ Return True
143+ End If
144+ If CanReverse(x, y, -1, 0) Then
145+ Return True
146+ End If
147+ If CanReverse(x, y, -1, 1) Then
148+ Return True
149+ End If
150+ If CanReverse(x, y, 0, -1) Then
151+ Return True
152+ End If
153+ If CanReverse(x, y, 0, 1) Then
154+ Return True
155+ End If
156+ If CanReverse(x, y, 1, -1) Then
157+ Return True
158+ End If
159+ If CanReverse(x, y, 1, 0) Then
160+ Return True
161+ End If
162+ If CanReverse(x, y, 1, 1) Then
163+ Return True
164+ End If
165+
166+ Return False
167+ End Function
168+
169+ Private Function CanReverse(ByVal sourceX As Integer, ByVal sourceY As Integer, ByVal directionX As Integer, ByVal directionY As Integer) As Boolean
170+ Dim x As Integer = sourceX + directionX
171+ Dim y As Integer = sourceY + directionY
172+
173+ If Not ValidPosition(x, y) Then
174+ Return False
175+ End If
176+
177+ If CellStone(x, y) = EMPTY Then
178+ Return False
179+ End If
180+
181+ If CellStone(x, y) = Turn Then
182+ Return False
183+ End If
184+
185+ x += directionX
186+ y += directionY
187+
188+ While ValidPosition(x, y)
189+ If CellStone(x, y) = EMPTY Then
190+ Return False
191+ End If
192+ If CellStone(x, y) = Turn Then
193+ Return True
194+ End If
195+ x += directionX
196+ y += directionY
197+ End While
198+
199+ Return False
200+
201+ End Function
202+
203+End Class
--- tags/version0.1b/VisualBasic/ReversiGame/ReversiGame/frmMain.vb (nonexistent)
+++ tags/version0.1b/VisualBasic/ReversiGame/ReversiGame/frmMain.vb (revision 23)
@@ -0,0 +1,124 @@
1+Public Class frmMain
2+ Const CellSize = 40
3+
4+ Private _nowBoard As New Board
5+ Private Player As Integer
6+ Private _computerAI As New computerAI
7+
8+ Public Sub Draw(ByVal g As Graphics, ByVal target As Board)
9+
10+ Dim X As Integer
11+ Dim Y As Integer
12+ Dim BorderPen As New Pen(Color.Black, 2)
13+
14+ '▼グリッドの描画
15+
16+ '深緑の四角形
17+ g.FillRectangle(Brushes.DarkGreen, 0, 0, Board.SIZE_X * CellSize, Board.SIZE_Y * CellSize)
18+
19+ '縦の9本の線
20+ For X = 0 To Board.SIZE_X
21+ g.DrawLine(BorderPen, X * CellSize, 0, X * CellSize, Board.SIZE_Y * CellSize)
22+ Next
23+
24+ '横の9本の線
25+ For Y = 0 To Board.SIZE_Y
26+ g.DrawLine(BorderPen, 0, Y * CellSize, Board.SIZE_X * CellSize, Y * CellSize)
27+ Next
28+
29+
30+ '▼セルの状態を描画
31+ For Y = 0 To Board.SIZE_Y - 1
32+ For X = -0 To Board.SIZE_X - 1
33+ Dim rect As Rectangle
34+ rect.X = X * CellSize + 2
35+ rect.Y = Y * CellSize + 2
36+ rect.Width = CellSize - 4
37+ rect.Height = CellSize - 4
38+ If target.CellStone(X, Y) = Board.BLACK Then
39+ DrawCell(g, rect, Brushes.Black, Brushes.White)
40+ ElseIf target.CellStone(X, Y) = Board.WHITE Then
41+ DrawCell(g, rect, Brushes.White, Brushes.Black)
42+ End If
43+ Next
44+ Next
45+
46+ End Sub
47+
48+ Private Sub DrawCell(ByVal g As Graphics, ByVal cellRect As Rectangle, ByVal frontBrush As Brush, ByVal backBrush As Brush)
49+ cellRect.Y += 2
50+ g.FillEllipse(backBrush, cellRect)
51+ cellRect.Y -= 2
52+ g.FillEllipse(frontBrush, cellRect)
53+ End Sub
54+
55+
56+ Private Sub PictureBox1_Paint(ByVal sender As System.Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles PictureBox1.Paint
57+ Draw(e.Graphics, _nowBoard)
58+ End Sub
59+
60+
61+ Private Sub PictureBox1_MouseClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles PictureBox1.MouseClick
62+ If _nowBoard.Turn <> Player Then
63+ Return
64+ End If
65+ Dim x As Integer = e.X \ CellSize
66+ Dim y As Integer = e.Y \ CellSize
67+
68+ If Not Board.ValidPosition(x, y) Then
69+ Return
70+ End If
71+ If _nowBoard.CanPut(x, y) Then
72+ _nowBoard.Put(x, y)
73+ PictureBox1.Invalidate()
74+ TurnChangeAndDecideGameWinner()
75+ End If
76+ End Sub
77+
78+ Private Sub TurnChangeAndDecideGameWinner()
79+ _nowBoard.TurnChange()
80+ If Not _nowBoard.CanPut() Then
81+ _nowBoard.TurnChange()
82+ If _nowBoard.CanPut() Then
83+ If _nowBoard.Turn = Board.BLACK Then
84+ MessageBox.Show("白は打てません。")
85+ Else
86+ MessageBox.Show("黒は打てません。")
87+ End If
88+ Else
89+ _nowBoard.IsGameEnd = True
90+ Dim whiteCount As Integer = _nowBoard.StoneCount(Board.WHITE)
91+ Dim blackCount As Integer = _nowBoard.StoneCount(Board.BLACK)
92+ If whiteCount > blackCount Then
93+ MessageBox.Show(String.Format("{0}対{1}で白の勝ち", whiteCount, blackCount))
94+ ElseIf whiteCount < blackCount Then
95+ MessageBox.Show(String.Format("{0}対{1}で黒の勝ち", blackCount, whiteCount))
96+ Else
97+ MessageBox.Show(String.Format("{0}対{1}で引き分け", blackCount, whiteCount))
98+ End If
99+ End If
100+ End If
101+
102+ If Not _nowBoard.IsGameEnd Then
103+ If _nowBoard.Turn <> Player Then
104+ _computerAI.DoPut(_nowBoard)
105+ TurnChangeAndDecideGameWinner()
106+ PictureBox1.Invalidate()
107+ End If
108+ End If
109+
110+
111+ End Sub
112+
113+
114+ Private Sub frmMain_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
115+ If MessageBox.Show("あなたは黒ですか?", "手番選択", MessageBoxButtons.YesNo) = Windows.Forms.DialogResult.Yes Then
116+ Player = Board.BLACK
117+ Else
118+ Player = Board.WHITE
119+ _computerAI.DoPut(_nowBoard)
120+ TurnChangeAndDecideGameWinner()
121+ End If
122+
123+ End Sub
124+End Class
--- tags/version0.1b/VisualBasic/ReversiGame/ReversiGame/frmMain.Designer.vb (nonexistent)
+++ tags/version0.1b/VisualBasic/ReversiGame/ReversiGame/frmMain.Designer.vb (revision 23)
@@ -0,0 +1,51 @@
1+<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
2+Partial Class frmMain
3+ Inherits System.Windows.Forms.Form
4+
5+ 'フォームがコンポーネントの一覧をクリーンアップするために dispose をオーバーライドします。
6+ <System.Diagnostics.DebuggerNonUserCode()> _
7+ Protected Overrides Sub Dispose(ByVal disposing As Boolean)
8+ Try
9+ If disposing AndAlso components IsNot Nothing Then
10+ components.Dispose()
11+ End If
12+ Finally
13+ MyBase.Dispose(disposing)
14+ End Try
15+ End Sub
16+
17+ 'Windows フォーム デザイナーで必要です。
18+ Private components As System.ComponentModel.IContainer
19+
20+ 'メモ: 以下のプロシージャは Windows フォーム デザイナーで必要です。
21+ 'Windows フォーム デザイナーを使用して変更できます。
22+ 'コード エディターを使って変更しないでください。
23+ <System.Diagnostics.DebuggerStepThrough()> _
24+ Private Sub InitializeComponent()
25+ Me.PictureBox1 = New System.Windows.Forms.PictureBox()
26+ CType(Me.PictureBox1, System.ComponentModel.ISupportInitialize).BeginInit()
27+ Me.SuspendLayout()
28+ '
29+ 'PictureBox1
30+ '
31+ Me.PictureBox1.Location = New System.Drawing.Point(12, 12)
32+ Me.PictureBox1.Name = "PictureBox1"
33+ Me.PictureBox1.Size = New System.Drawing.Size(589, 478)
34+ Me.PictureBox1.TabIndex = 0
35+ Me.PictureBox1.TabStop = False
36+ '
37+ 'frmMain
38+ '
39+ Me.AutoScaleDimensions = New System.Drawing.SizeF(8.0!, 15.0!)
40+ Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
41+ Me.ClientSize = New System.Drawing.Size(630, 502)
42+ Me.Controls.Add(Me.PictureBox1)
43+ Me.Name = "frmMain"
44+ Me.Text = "Form1"
45+ CType(Me.PictureBox1, System.ComponentModel.ISupportInitialize).EndInit()
46+ Me.ResumeLayout(False)
47+
48+ End Sub
49+ Friend WithEvents PictureBox1 As System.Windows.Forms.PictureBox
50+
51+End Class
--- tags/version0.1b/VisualBasic/ReversiGame/ReversiGame/My Project/Resources.Designer.vb (nonexistent)
+++ tags/version0.1b/VisualBasic/ReversiGame/ReversiGame/My Project/Resources.Designer.vb (revision 23)
@@ -0,0 +1,62 @@
1+'------------------------------------------------------------------------------
2+' <auto-generated>
3+' This code was generated by a tool.
4+' Runtime Version:4.0.30319.34209
5+'
6+' Changes to this file may cause incorrect behavior and will be lost if
7+' the code is regenerated.
8+' </auto-generated>
9+'------------------------------------------------------------------------------
10+
11+Option Strict On
12+Option Explicit On
13+
14+
15+Namespace My.Resources
16+
17+ 'This class was auto-generated by the StronglyTypedResourceBuilder
18+ 'class via a tool like ResGen or Visual Studio.
19+ 'To add or remove a member, edit your .ResX file then rerun ResGen
20+ 'with the /str option, or rebuild your VS project.
21+ '''<summary>
22+ ''' A strongly-typed resource class, for looking up localized strings, etc.
23+ '''</summary>
24+ <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0"), _
25+ Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
26+ Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _
27+ Global.Microsoft.VisualBasic.HideModuleNameAttribute()> _
28+ Friend Module Resources
29+
30+ Private resourceMan As Global.System.Resources.ResourceManager
31+
32+ Private resourceCulture As Global.System.Globalization.CultureInfo
33+
34+ '''<summary>
35+ ''' Returns the cached ResourceManager instance used by this class.
36+ '''</summary>
37+ <Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
38+ Friend ReadOnly Property ResourceManager() As Global.System.Resources.ResourceManager
39+ Get
40+ If Object.ReferenceEquals(resourceMan, Nothing) Then
41+ Dim temp As Global.System.Resources.ResourceManager = New Global.System.Resources.ResourceManager("ReversiGame.Resources", GetType(Resources).Assembly)
42+ resourceMan = temp
43+ End If
44+ Return resourceMan
45+ End Get
46+ End Property
47+
48+ '''<summary>
49+ ''' Overrides the current thread's CurrentUICulture property for all
50+ ''' resource lookups using this strongly typed resource class.
51+ '''</summary>
52+ <Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
53+ Friend Property Culture() As Global.System.Globalization.CultureInfo
54+ Get
55+ Return resourceCulture
56+ End Get
57+ Set(ByVal value As Global.System.Globalization.CultureInfo)
58+ resourceCulture = value
59+ End Set
60+ End Property
61+ End Module
62+End Namespace
--- tags/version0.1b/VisualBasic/ReversiGame/ReversiGame/My Project/AssemblyInfo.vb (nonexistent)
+++ tags/version0.1b/VisualBasic/ReversiGame/ReversiGame/My Project/AssemblyInfo.vb (revision 23)
@@ -0,0 +1,35 @@
1+Imports System
2+Imports System.Reflection
3+Imports System.Runtime.InteropServices
4+
5+' アセンブリに関する一般情報は以下の属性セットをとおして制御されます。
6+' アセンブリに関連付けられている情報を変更するには、
7+' これらの属性値を変更してください。
8+
9+' アセンブリ属性の値を確認します。
10+
11+<Assembly: AssemblyTitle("ReversiGame")>
12+<Assembly: AssemblyDescription("")>
13+<Assembly: AssemblyCompany("")>
14+<Assembly: AssemblyProduct("ReversiGame")>
15+<Assembly: AssemblyCopyright("Copyright © 2015")>
16+<Assembly: AssemblyTrademark("")>
17+
18+<Assembly: ComVisible(False)>
19+
20+'このプロジェクトが COM に公開される場合、次の GUID がタイプ ライブラリの ID になります。
21+<Assembly: Guid("674f2ee9-20a3-45f0-ac2f-fe3b7cb0812d")>
22+
23+' アセンブリのバージョン情報は、以下の 4 つの値で構成されています:
24+'
25+' Major Version
26+' Minor Version
27+' Build Number
28+' Revision
29+'
30+' すべての値を指定するか、下のように '*' を使ってビルドおよびリビジョン番号を
31+' 既定値にすることができます:
32+' <Assembly: AssemblyVersion("1.0.*")>
33+
34+<Assembly: AssemblyVersion("1.0.0.0")>
35+<Assembly: AssemblyFileVersion("1.0.0.0")>
--- tags/version0.1b/VisualBasic/ReversiGame/ReversiGame/My Project/Settings.Designer.vb (nonexistent)
+++ tags/version0.1b/VisualBasic/ReversiGame/ReversiGame/My Project/Settings.Designer.vb (revision 23)
@@ -0,0 +1,73 @@
1+'------------------------------------------------------------------------------
2+' <auto-generated>
3+' This code was generated by a tool.
4+' Runtime Version:4.0.30319.34209
5+'
6+' Changes to this file may cause incorrect behavior and will be lost if
7+' the code is regenerated.
8+' </auto-generated>
9+'------------------------------------------------------------------------------
10+
11+Option Strict On
12+Option Explicit On
13+
14+
15+Namespace My
16+
17+ <Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _
18+ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "10.0.0.0"), _
19+ Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
20+ Partial Friend NotInheritable Class MySettings
21+ Inherits Global.System.Configuration.ApplicationSettingsBase
22+
23+ Private Shared defaultInstance As MySettings = CType(Global.System.Configuration.ApplicationSettingsBase.Synchronized(New MySettings), MySettings)
24+
25+#Region "My.Settings Auto-Save Functionality"
26+#If _MyType = "WindowsForms" Then
27+ Private Shared addedHandler As Boolean
28+
29+ Private Shared addedHandlerLockObject As New Object
30+
31+ <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
32+ Private Shared Sub AutoSaveSettings(ByVal sender As Global.System.Object, ByVal e As Global.System.EventArgs)
33+ If My.Application.SaveMySettingsOnExit Then
34+ My.Settings.Save()
35+ End If
36+ End Sub
37+#End If
38+#End Region
39+
40+ Public Shared ReadOnly Property [Default]() As MySettings
41+ Get
42+
43+#If _MyType = "WindowsForms" Then
44+ If Not addedHandler Then
45+ SyncLock addedHandlerLockObject
46+ If Not addedHandler Then
47+ AddHandler My.Application.Shutdown, AddressOf AutoSaveSettings
48+ addedHandler = True
49+ End If
50+ End SyncLock
51+ End If
52+#End If
53+ Return defaultInstance
54+ End Get
55+ End Property
56+ End Class
57+End Namespace
58+
59+Namespace My
60+
61+ <Global.Microsoft.VisualBasic.HideModuleNameAttribute(), _
62+ Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
63+ Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute()> _
64+ Friend Module MySettingsProperty
65+
66+ <Global.System.ComponentModel.Design.HelpKeywordAttribute("My.Settings")> _
67+ Friend ReadOnly Property Settings() As Global.ReversiGame.My.MySettings
68+ Get
69+ Return Global.ReversiGame.My.MySettings.Default
70+ End Get
71+ End Property
72+ End Module
73+End Namespace
--- tags/version0.1b/VisualBasic/ReversiGame/ReversiGame/My Project/Application.Designer.vb (nonexistent)
+++ tags/version0.1b/VisualBasic/ReversiGame/ReversiGame/My Project/Application.Designer.vb (revision 23)
@@ -0,0 +1,38 @@
1+'------------------------------------------------------------------------------
2+' <auto-generated>
3+' This code was generated by a tool.
4+' Runtime Version:4.0.30319.34209
5+'
6+' Changes to this file may cause incorrect behavior and will be lost if
7+' the code is regenerated.
8+' </auto-generated>
9+'------------------------------------------------------------------------------
10+
11+Option Strict On
12+Option Explicit On
13+
14+
15+Namespace My
16+
17+ 'NOTE: This file is auto-generated; do not modify it directly. To make changes,
18+ ' or if you encounter build errors in this file, go to the Project Designer
19+ ' (go to Project Properties or double-click the My Project node in
20+ ' Solution Explorer), and make changes on the Application tab.
21+ '
22+ Partial Friend Class MyApplication
23+
24+ <Global.System.Diagnostics.DebuggerStepThroughAttribute()> _
25+ Public Sub New()
26+ MyBase.New(Global.Microsoft.VisualBasic.ApplicationServices.AuthenticationMode.Windows)
27+ Me.IsSingleInstance = false
28+ Me.EnableVisualStyles = true
29+ Me.SaveMySettingsOnExit = true
30+ Me.ShutDownStyle = Global.Microsoft.VisualBasic.ApplicationServices.ShutdownMode.AfterMainFormCloses
31+ End Sub
32+
33+ <Global.System.Diagnostics.DebuggerStepThroughAttribute()> _
34+ Protected Overrides Sub OnCreateMainForm()
35+ Me.MainForm = Global.ReversiGame.frmMain
36+ End Sub
37+ End Class
38+End Namespace