<?xml version="1.0" encoding="utf-8"?>
<Application>
	<AppTitle>Banker Player Grid</AppTitle>
	<AppShortName>BankerGrid</AppShortName>
	<Author>Author name</Author>
	<Version>1.0</Version>
	<VariablesScanned>False</VariablesScanned>
	<PageWidth>1024</PageWidth>
	<PageHeight>600</PageHeight>
	<AutoSizeWidth>False</AutoSizeWidth>
	<AutoSizeHeight>False</AutoSizeHeight>
	<HideScrollbars>False</HideScrollbars>
	<ResponsiveSize>False</ResponsiveSize>
	<PublishPlatform>WebApp</PublishPlatform>
	<EmptyBuildFolder>False</EmptyBuildFolder>
	<AppIcon>C:\Users\mzwer\OneDrive\Documents\VisualNeoWeb\Libraries\img\default-icon.png</AppIcon>
	<LanguageCode>en</LanguageCode>
	<DisplayMode>standalone</DisplayMode>
	<ServiceWorker>OfflineCopyOfPages</ServiceWorker>
	<ThemeColor>#000000</ThemeColor>
	<PwaScope>/</PwaScope>
	<MobileOSTypes>[AndroidOS,iOS,WindowsPhoneOS]</MobileOSTypes>
	<WindowState>normal</WindowState>
	<TitleBar>True</TitleBar>
	<Sizeable>True</Sizeable>
	<MaximizeBtn>False</MaximizeBtn>
	<MinimizeBtn>True</MinimizeBtn>
	<SystemMenu>True</SystemMenu>
	<ContextMenu>False</ContextMenu>
	<AlwaysOnTop>False</AlwaysOnTop>
	<ShowInTaskbar>True</ShowInTaskbar>
	<SingleInstance>False</SingleInstance>
	<ChromeKioskMode>False</ChromeKioskMode>
	<Components>
		<FunctionList name="Subroutines">
			<Components>
				<Function name="InitGrid">
					<Code>SetVar [rows] 5
SetVar [cols] 12
SetVar [cw] 50
SetVar [ch] 50
SetVar [gap] 4
SetVar [extraGap] 10
SetVar [startX] 20
SetVar [startY] 120
SetVar [count] 0

Loop 1 12 [c]
  Math &quot;[c]-1&quot; [ci] 0
  Math &quot;Int([ci]/2)&quot; [pairs] 0
  Math &quot;[startX] + [ci]*([cw]+[gap]) + [pairs]*[extraGap]&quot; [x] 0

  Loop 1 5 [r]
    Math &quot;[r]-1&quot; [ri] 0
    Math &quot;[startY] + [ri]*([ch]+[gap])&quot; [y] 0
    Math &quot;[count]+1&quot; [count] 0
    SetVar [cid] &quot;Cell_[count]&quot;
    DuplicateObjectEx &quot;CellT&quot; [cid] &quot;Board&quot; &quot;left:[x]px;top:[y]px;width:[cw]px;height:[ch]px;display:flex;align-items:center;justify-content:center;border:1px solid #333;font-size:22px;font-weight:bold;background:#fff;&quot;
    SetObjectHTML [cid] &quot;&amp;nbsp;&quot;
  EndLoop
EndLoop

SetObjectStyle &quot;CellT&quot; &quot;display&quot; &quot;none&quot;
SetVar [nextIndex] 1</Code>
				</Function>
				<Function name="PlaceMark">
					<Code>If [nextIndex] &gt; 60
  AlertBox &quot;Grid is full&quot; &quot;Full&quot; &quot;&quot;
EndIf

If [mark] == &quot;B&quot;
  SetObjectHTML &quot;Cell_[nextIndex]&quot; &quot;&lt;b style=&apos;color:red&apos;&gt;B&lt;/b&gt;&quot;
Else
  SetObjectHTML &quot;Cell_[nextIndex]&quot; &quot;&lt;b style=&apos;color:blue&apos;&gt;P&lt;/b&gt;&quot;
EndIf

Math &quot;[nextIndex]+1&quot; [nextIndex] 0</Code>
				</Function>
				<Function name="ResetGrid">
					<Code>Loop 1 60 [i]
  SetObjectHTML &quot;Cell_[i]&quot; &quot;&amp;nbsp;&quot;
EndLoop
SetVar [nextIndex] 1</Code>
				</Function>
			</Components>
		</FunctionList>
		<LibraryList name="Libraries"/>
		<PageList name="Main">
			<Components>
				<Page id="MainPage">
					<style>background-color:#f0f0f0;</style>
					<pageenter>InitGrid</pageenter>
					<Components>
						<PushButton id="BankerBtn">
							<left>40px</left>
							<top>40px</top>
							<width>100px</width>
							<height>40px</height>
							<style>background-color:#ff3333;color:#fff;font-weight:bold;</style>
							<caption>Banker</caption>
							<click>SetVar [mark] &quot;B&quot;
PlaceMark</click>
						</PushButton>
						<PushButton id="PlayerBtn">
							<left>160px</left>
							<top>40px</top>
							<width>100px</width>
							<height>40px</height>
							<style>background-color:#3366ff;color:#fff;font-weight:bold;</style>
							<caption>Player</caption>
							<click>SetVar [mark] &quot;P&quot;
PlaceMark</click>
						</PushButton>
						<PushButton id="ResetBtn">
							<left>280px</left>
							<top>40px</top>
							<width>100px</width>
							<height>40px</height>
							<style>background-color:#777;color:#fff;</style>
							<caption>Reset</caption>
							<click>ResetGrid</click>
						</PushButton>
						<Container id="Board">
							<left>42px</left>
							<top>120px</top>
							<width>950px</width>
							<height>400px</height>
							<style>position:relative;background:#fafafa;border:1px solid #ccc;</style>
							<Components>
								<Rectangle id="CellT">
									<left>10px</left>
									<top>10px</top>
									<width>50px</width>
									<height>50px</height>
									<style>background:#fff;border:1px solid #333;text-align:center;font-size:20px;</style>
									<corner_radius>0</corner_radius>
								</Rectangle>
							</Components>
						</Container>
					</Components>
				</Page>
			</Components>
		</PageList>
		<PageList name="Master">
			<Components>
				<Page id="MasterPage"/>
			</Components>
		</PageList>
		<PageList name="Dialog">
			<Components>
				<Page id="NewDialog">
					<Components>
						<DialogContainer id="DialogContainer1">
							<left>0px</left>
							<top>0px</top>
							<width>1024px</width>
							<height>600px</height>
							<close_button>False</close_button>
							<kind>custom</kind>
						</DialogContainer>
					</Components>
				</Page>
			</Components>
		</PageList>
	</Components>
</Application>
