diff --git a/Monopoly.Web/Pages/Ready/Entities/ColorEnum.cs b/Monopoly.Web/Pages/Enums/ColorEnum.cs similarity index 65% rename from Monopoly.Web/Pages/Ready/Entities/ColorEnum.cs rename to Monopoly.Web/Pages/Enums/ColorEnum.cs index 6499621..ff92b90 100644 --- a/Monopoly.Web/Pages/Ready/Entities/ColorEnum.cs +++ b/Monopoly.Web/Pages/Enums/ColorEnum.cs @@ -1,4 +1,4 @@ -namespace Client.Pages.Ready.Entities; +namespace Client.Pages.Enums; public enum ColorEnum { diff --git a/Monopoly.Web/Pages/Enums/GamingStatusEnum.cs b/Monopoly.Web/Pages/Enums/GamingStatusEnum.cs new file mode 100644 index 0000000..e9c82f3 --- /dev/null +++ b/Monopoly.Web/Pages/Enums/GamingStatusEnum.cs @@ -0,0 +1,6 @@ +namespace Client.Pages.Enums; + +public enum GamingStatusEnum +{ + None, +} diff --git a/Monopoly.Web/Pages/Ready/Entities/RoleEnum.cs b/Monopoly.Web/Pages/Enums/RoleEnum.cs similarity index 64% rename from Monopoly.Web/Pages/Ready/Entities/RoleEnum.cs rename to Monopoly.Web/Pages/Enums/RoleEnum.cs index 6ac7611..4792895 100644 --- a/Monopoly.Web/Pages/Ready/Entities/RoleEnum.cs +++ b/Monopoly.Web/Pages/Enums/RoleEnum.cs @@ -1,4 +1,4 @@ -namespace Client.Pages.Ready.Entities; +namespace Client.Pages.Enums; public enum RoleEnum { diff --git a/Monopoly.Web/Pages/Gaming/Components/ChatBox.razor b/Monopoly.Web/Pages/Gaming/Components/ChatBox.razor new file mode 100644 index 0000000..2aa4588 --- /dev/null +++ b/Monopoly.Web/Pages/Gaming/Components/ChatBox.razor @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/Monopoly.Web/Pages/Gaming/Components/ChatBox.razor.cs b/Monopoly.Web/Pages/Gaming/Components/ChatBox.razor.cs new file mode 100644 index 0000000..5e48cb6 --- /dev/null +++ b/Monopoly.Web/Pages/Gaming/Components/ChatBox.razor.cs @@ -0,0 +1,5 @@ +namespace Client.Pages.Gaming.Components; + +public partial class ChatBox +{ +} diff --git a/Monopoly.Web/Pages/Gaming/Components/ChatBox.razor.css b/Monopoly.Web/Pages/Gaming/Components/ChatBox.razor.css new file mode 100644 index 0000000..af9d8b4 --- /dev/null +++ b/Monopoly.Web/Pages/Gaming/Components/ChatBox.razor.css @@ -0,0 +1,9 @@ + +.ChatBox { + position: absolute; + width: calc(603 * var(--unit)); + height: calc(180 * var(--unit)); + top: calc(888 * var(--unit)); + left: calc(32 * var(--unit)); + background-color: coral; +} diff --git a/Monopoly.Web/Pages/Gaming/Components/GameRound.razor b/Monopoly.Web/Pages/Gaming/Components/GameRound.razor new file mode 100644 index 0000000..8f48574 --- /dev/null +++ b/Monopoly.Web/Pages/Gaming/Components/GameRound.razor @@ -0,0 +1,11 @@ +
+ +
+
+ 10:00 +
+
+ 0回合 +
+
+
\ No newline at end of file diff --git a/Monopoly.Web/Pages/Gaming/Components/GameRound.razor.cs b/Monopoly.Web/Pages/Gaming/Components/GameRound.razor.cs new file mode 100644 index 0000000..3a237ea --- /dev/null +++ b/Monopoly.Web/Pages/Gaming/Components/GameRound.razor.cs @@ -0,0 +1,5 @@ +namespace Client.Pages.Gaming.Components; + +public partial class GameRound +{ +} diff --git a/Monopoly.Web/Pages/Gaming/Components/GameRound.razor.css b/Monopoly.Web/Pages/Gaming/Components/GameRound.razor.css new file mode 100644 index 0000000..3812fc8 --- /dev/null +++ b/Monopoly.Web/Pages/Gaming/Components/GameRound.razor.css @@ -0,0 +1,84 @@ + +.GameRound { + position: absolute; + width: calc(170 * var(--unit)); + height: calc(135 * var(--unit)); + top: calc(24 * var(--unit)); + left: calc(32 * var(--unit)); +} + +.Round_Info { + position: absolute; + width: calc(170 * var(--unit)); + height: calc(135 * var(--unit)); + top: 0; + left: 0; + /*background-image: url('./images/gamepage/Round.svg');*/ + background-size: cover; + background-position: center; +} + +.TimeBox { + width: calc(170 * var(--unit)); + height: calc(52 * var(--unit)); + background-color: #B67171; /* 底色 */ + border: calc(3 * var(--unit)) solid #5B5B5B; /* 方框邊框寬度和顏色 */ + border-bottom: none; /* 下方框邊框寬度和顏色*/ + border-top-left-radius: calc(10 * var(--unit)); /* 左上角方框圓角半徑 */ + border-top-right-radius: calc(10 * var(--unit)); /* 右上角方框圓角半徑 */ +} + + .TimeBox .Alarm_Clock { + position: absolute; + width: calc(24 * var(--unit)); + height: calc(24 * var(--unit)); + top: calc(15 * var(--unit)); + left: calc(30 * var(--unit)); + background-image: url('./images/gamepage/alarm_clock.svg'); + background-size: cover; + background-position: center; + } + + .TimeBox .Time_Str { + position: absolute; + width: calc(78 * var(--unit)); + height: calc(33 * var(--unit)); + top: calc(15 * var(--unit)); + left: calc(62 * var(--unit)); + color: white; + font-size: calc(24 * var(--unit)); + text-align: center; + } + +.RoundBox { + width: calc(170 * var(--unit)); + height: calc(77 * var(--unit)); + background-color: white; /* 底色 */ + border: calc(3 * var(--unit)) solid #5B5B5B; /* 方框邊框寬度和顏色 */ + border-top: none; /* 上方框線框寬度和顏色 */ + border-bottom-left-radius: calc(10 * var(--unit)); /* 右下角方框圓角半徑 */ + border-bottom-right-radius: calc(10 * var(--unit)); /* 右下角方框圓角半徑 */ +} + .RoundBox .Round_Str { + position: absolute; + color: #595959; + font-size: calc(20 * var(--unit)); + } + .RoundBox .Round_Str.Start { + top: calc(94 * var(--unit)); + left: calc(23 * var(--unit)); + } + .RoundBox .Round_Str.End { + top: calc(94 * var(--unit)); + left: calc(108 * var(--unit)); + } + .RoundBox .Round_Number { + position: absolute; + width: calc(59 * var(--unit)); + height: calc(58 * var(--unit)); + top: calc(67 * var(--unit)); + left: calc(46 * var(--unit)); + color: #595959; + font-size: calc(48 * var(--unit)); + text-align: center; + } \ No newline at end of file diff --git a/Monopoly.Web/Pages/Gaming/Components/Go.razor b/Monopoly.Web/Pages/Gaming/Components/Go.razor new file mode 100644 index 0000000..c5a29f8 --- /dev/null +++ b/Monopoly.Web/Pages/Gaming/Components/Go.razor @@ -0,0 +1,32 @@ + + + + + + + + \ No newline at end of file diff --git a/Monopoly.Web/Pages/Gaming/Components/Go.razor.cs b/Monopoly.Web/Pages/Gaming/Components/Go.razor.cs new file mode 100644 index 0000000..d1050a9 --- /dev/null +++ b/Monopoly.Web/Pages/Gaming/Components/Go.razor.cs @@ -0,0 +1,5 @@ +namespace Client.Pages.Gaming.Components; + +public partial class Go +{ +} diff --git a/Monopoly.Web/Pages/Gaming/Components/Go.razor.css b/Monopoly.Web/Pages/Gaming/Components/Go.razor.css new file mode 100644 index 0000000..4035667 --- /dev/null +++ b/Monopoly.Web/Pages/Gaming/Components/Go.razor.css @@ -0,0 +1,40 @@ + +.Go { + position: absolute; + width: calc(257 * var(--unit)); + height: calc(224 * var(--unit)); + top: calc(840 * var(--unit)); + left: calc(1632 * var(--unit)); + /*background-color: coral;*/ +} + +.GoBetton { + position: absolute; + width: calc(224 * var(--unit)); + height: calc(224 * var(--unit)); + top: 0; + left: 0; + background-image: url('./images/gamepage/Go_Default.svg'); + background-size: cover; + background-position: center; + + } + + .GoBetton.Pressed { + background-image: url('./images/gamepage/Go_Pressed.svg'); + } + +.AutoBetton { + position: absolute; + width: calc(72 * var(--unit)); + height: calc(32 * var(--unit)); + top: calc(177 * var(--unit)); + left: calc(185 * var(--unit)); + background-image: url('./images/gamepage/AutoButtun_Off.svg'); + background-size: cover; + background-position: center; +} + + .AutoBetton.Open { + background-image: url('./images/gamepage/AutoButtun_On.svg'); + } \ No newline at end of file diff --git a/Monopoly.Web/Pages/Gaming/Components/PlayerInfo.razor b/Monopoly.Web/Pages/Gaming/Components/PlayerInfo.razor new file mode 100644 index 0000000..c1cd989 --- /dev/null +++ b/Monopoly.Web/Pages/Gaming/Components/PlayerInfo.razor @@ -0,0 +1,46 @@ +@using Client.Pages.Gaming.Entities +@code { + [CascadingParameter] + public GamingPage Parent { get; set; } = default!; + private Player player => Parent?.Players.FirstOrDefault(); +} + +
+ @player.Money +
+
+ @player.GetTotalMoney +
+
+
+ 抵押清單 +
+
+ +
+
+ + \ No newline at end of file diff --git a/Monopoly.Web/Pages/Gaming/Components/PlayerInfo.razor.cs b/Monopoly.Web/Pages/Gaming/Components/PlayerInfo.razor.cs new file mode 100644 index 0000000..67aeebc --- /dev/null +++ b/Monopoly.Web/Pages/Gaming/Components/PlayerInfo.razor.cs @@ -0,0 +1,5 @@ +namespace Client.Pages.Gaming.Components; + +public partial class PlayerInfo +{ +} diff --git a/Monopoly.Web/Pages/Gaming/Components/PlayerInfo.razor.css b/Monopoly.Web/Pages/Gaming/Components/PlayerInfo.razor.css new file mode 100644 index 0000000..500312d --- /dev/null +++ b/Monopoly.Web/Pages/Gaming/Components/PlayerInfo.razor.css @@ -0,0 +1,79 @@ +.PlayerInfo { + position: absolute; + top: calc(213 * var(--unit)); + left: calc(1644 * var(--unit)); + border-radius: calc(20 * var(--unit)); /* 方框圓角半徑 */ + border: calc(4 * var(--unit)) solid white; /* 方框邊框寬度和顏色 */ + background-color: #5B5B5B; /* 底色 */ + padding: 1rem; /* 4邊起始位置往內推一個字(16px) */ +} + + .PlayerInfo .withBalls::before, .PlayerInfo .withBalls::after { + content: ''; + display: inline-block; + position: absolute; + width: .5rem; + height: .5rem; + background-color: white; + border-radius: 50%; + transform: translateY(-50%); + } + + .PlayerInfo .withBalls::before { + left: 1rem; + } + + .PlayerInfo .withBalls::after { + right: 1rem; + } + + .PlayerInfo .money, .PlayerInfo .TotalMoney { + display: flex; + align-items: center; + width: calc(206 * var(--unit)); + color: white; + font-size: calc(20 * var(--unit)); + } + + .PlayerInfo .money::before, .PlayerInfo .TotalMoney::before { + content: ""; + display: inline-block; + width: calc(15 * var(--unit)); + height: calc(15 * var(--unit)); + margin-right: calc(4 * var(--unit)); + margin-bottom: calc(-3 * var(--unit)); + background-size: cover; + background-position: center; + } + + .PlayerInfo .money::before { + background-image: url('./images/gamepage/icon_mini_money.svg'); + } + + .PlayerInfo .TotalMoney::before { + background-image: url('./images/gamepage/icon_mini_home.svg'); + } + + .PlayerInfo .MortgageList { + color: #D8C292; + font-size: 20px; + } + + .PlayerInfo .collapseBtn { + color: white; + cursor: pointer; + text-align: center; + font-size: 1.25rem; + user-select: none; + } + + .PlayerInfo .collapseBtn:hover { + text-decoration: underline; + } + + .PlayerInfo .MortgageList.collapseHide { + opacity: 0; + height: 0; + overflow: hidden; + pointer-events: none; + } \ No newline at end of file diff --git a/Monopoly.Web/Pages/Gaming/Components/PlayerRankList.razor b/Monopoly.Web/Pages/Gaming/Components/PlayerRankList.razor new file mode 100644 index 0000000..40eaa9a --- /dev/null +++ b/Monopoly.Web/Pages/Gaming/Components/PlayerRankList.razor @@ -0,0 +1,33 @@ +@using Client.Pages.Gaming.Entities +@code { + [CascadingParameter] + public GamingPage Parent { get; set; } = default!; + private IEnumerable players => Parent?.Players; +} + +
+ @foreach (var (player, index) in players.OrderBy(p=>p.GetTotalMoney).Select((item, index) => (item, index))) + { +
+
+
+
+ @(@index + 1) +
+

+ @player.Name +

+
+
+
+
+

@player.Money

+

@player.GetTotalMoney

+
+
+
+
+
+
+ } +
\ No newline at end of file diff --git a/Monopoly.Web/Pages/Gaming/Components/PlayerRankList.razor.cs b/Monopoly.Web/Pages/Gaming/Components/PlayerRankList.razor.cs new file mode 100644 index 0000000..87cb4f3 --- /dev/null +++ b/Monopoly.Web/Pages/Gaming/Components/PlayerRankList.razor.cs @@ -0,0 +1,5 @@ +namespace Client.Pages.Gaming.Components; + +public partial class PlayerList +{ +} diff --git a/Monopoly.Web/Pages/Gaming/Components/PlayerRankList.razor.css b/Monopoly.Web/Pages/Gaming/Components/PlayerRankList.razor.css new file mode 100644 index 0000000..6c46871 --- /dev/null +++ b/Monopoly.Web/Pages/Gaming/Components/PlayerRankList.razor.css @@ -0,0 +1,116 @@ + +.PlayerRankList { + position: absolute; + width: calc(200 * var(--unit)); + height: calc(355 * var(--unit)); + top: calc(194 * var(--unit)); + left: 0; +} + + .PlayerRankList .PlayerInfo { + position: relative; + width: calc(178 * var(--unit)); + height: fit-content; + border-radius: calc(20 * var(--unit)); /* 方框圓角半徑 */ + border: calc(4 * var(--unit)) solid #008227; /* 方框邊框寬度和顏色 */ + background-color: #5B5B5B; /* 底色 */ + padding: 1rem; + margin-bottom: 8px; + } + + .PlayerRankList .PlayerInfo .Rank { + display: flex; + align-items: center; + gap: .5rem; + margin-bottom: .5rem; + } + + .PlayerRankList .PlayerInfo .Rank .Round { + display: flex; + justify-content: center; + align-items: center; + width: 24px; + height: 24px; + border-radius: 50%; /* 圓形 */ + border: calc(1 * var(--unit)) solid white; /* 外框 */ + background-color: #D8C292; /* 底色 */ + } + + .PlayerRankList .PlayerInfo .Rank .Round .Number { + color: #5B5B5B; + } + + .PlayerRankList .PlayerInfo .Name { + width: calc(40 * var(--unit)); + color: white; + font-size: calc(20 * var(--unit)); + margin: 0; + } + + .PlayerRankList .PlayerInfo .PlayerMoney { + display: flex; + align-items: center; + gap: .5rem; + } + + .PlayerRankList .PlayerInfo .Icon { + width: calc(60 * var(--unit)); + height: calc(50 * var(--unit)); + /*background-image: url('./images/roles/avatars/小美頭.svg');*/ + background-size: cover; + background-position: center; + } + + .PlayerRankList .PlayerInfo .Icon.baby { + background-image: url('images/roles/avatars/寶寶頭.svg'); + } + + .PlayerRankList .PlayerInfo .Icon.oldman { + background-image: url('images/roles/avatars/老人頭.svg'); + } + + .PlayerRankList .PlayerInfo .Icon.dai { + background-image: url('images/roles/avatars/阿呆頭.svg'); + } + + .PlayerRankList .PlayerInfo .Icon.mei { + background-image: url('images/roles/avatars/小美頭.svg'); + } + + .PlayerRankList .PlayerInfo .Money { + width: calc(94 * var(--unit)); + color: white; + font-size: calc(20 * var(--unit)); + margin: 0; + } + + .PlayerRankList .PlayerInfo .Money::before { + content: ""; + display: inline-block; + width: calc(15 * var(--unit)); + height: calc(15 * var(--unit)); + margin-right: calc(4 * var(--unit)); + margin-bottom: calc(-3 * var(--unit)); + background-image: url('./images/gamepage/icon_mini_money.svg'); + background-size: cover; + background-position: center; + } + + .PlayerRankList .PlayerInfo .TotalMoney { + width: calc(94 * var(--unit)); + color: white; + font-size: calc(20 * var(--unit)); + margin: 0; + } + + .PlayerRankList .PlayerInfo .TotalMoney::before { + content: ""; + display: inline-block; + width: calc(15 * var(--unit)); + height: calc(15 * var(--unit)); + margin-right: calc(4 * var(--unit)); + margin-bottom: calc(-3 * var(--unit)); + background-image: url('./images/gamepage/icon_mini_home.svg'); + background-size: cover; + background-position: center; + } diff --git a/Monopoly.Web/Pages/Gaming/Components/Settings.razor b/Monopoly.Web/Pages/Gaming/Components/Settings.razor new file mode 100644 index 0000000..d591066 --- /dev/null +++ b/Monopoly.Web/Pages/Gaming/Components/Settings.razor @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Monopoly.Web/Pages/Gaming/Components/Settings.razor.cs b/Monopoly.Web/Pages/Gaming/Components/Settings.razor.cs new file mode 100644 index 0000000..c3719c3 --- /dev/null +++ b/Monopoly.Web/Pages/Gaming/Components/Settings.razor.cs @@ -0,0 +1,5 @@ +namespace Client.Pages.Gaming.Components; + +public partial class Settings +{ +} diff --git a/Monopoly.Web/Pages/Gaming/Components/Settings.razor.css b/Monopoly.Web/Pages/Gaming/Components/Settings.razor.css new file mode 100644 index 0000000..424de6e --- /dev/null +++ b/Monopoly.Web/Pages/Gaming/Components/Settings.razor.css @@ -0,0 +1,52 @@ + +.Settings { + position: absolute; + width: calc(228 * var(--unit)); + height: calc(48 * var(--unit)); + top: calc(32 * var(--unit)); + left: calc(1660 * var(--unit)); +} + +.HostBetton { + position: absolute; + width: calc(48 * var(--unit)); + height: calc(48 * var(--unit)); + top: 0; + left: 0; + background-image: url('./images/gamepage/Icon_Host.svg'); + background-size: cover; + background-position: center; +} + +.InformationBetton { + position: absolute; + width: calc(48 * var(--unit)); + height: calc(48 * var(--unit)); + top: 0; + left: calc(60 * var(--unit)); + background-image: url('./images/gamepage/Icon_Information.svg'); + background-size: cover; + background-position: center; +} + +.SettingBetton { + position: absolute; + width: calc(48 * var(--unit)); + height: calc(48 * var(--unit)); + top: 0; + left: calc(120 * var(--unit)); + background-image: url('./images/gamepage/Icon_Setting.svg'); + background-size: cover; + background-position: center; +} + +.LeaveBetton { + position: absolute; + width: calc(48 * var(--unit)); + height: calc(48 * var(--unit)); + top: 0; + left: calc(180 * var(--unit)); + background-image: url('./images/gamepage/Icon_Leave.svg'); + background-size: cover; + background-position: center; +} \ No newline at end of file diff --git a/Monopoly.Web/Pages/Gaming/Entities/ILandContract.cs b/Monopoly.Web/Pages/Gaming/Entities/ILandContract.cs new file mode 100644 index 0000000..950518d --- /dev/null +++ b/Monopoly.Web/Pages/Gaming/Entities/ILandContract.cs @@ -0,0 +1,9 @@ +namespace Client.Pages.Gaming.Entities; + +public interface ILandContract +{ + int Money { get; set; } + int HouseCount { get; set; } + + int HouseMoney => HouseCount * 50; //TODO +} diff --git a/Monopoly.Web/Pages/Gaming/Entities/Player.cs b/Monopoly.Web/Pages/Gaming/Entities/Player.cs new file mode 100644 index 0000000..e2c065e --- /dev/null +++ b/Monopoly.Web/Pages/Gaming/Entities/Player.cs @@ -0,0 +1,19 @@ +using Client.Pages.Enums; + +namespace Client.Pages.Gaming.Entities; + +public class Player +{ + public string Id { get; set; } = string.Empty; + public string Name { get; set; } = string.Empty; + public bool IsHost { get; set; } = false; + public ColorEnum Color { get; set; } = ColorEnum.None; + public RoleEnum Role { get; set; } = RoleEnum.None; + public int Order { get; set; } = 0; + + public int Money { get; set; } = 0; + public IEnumerable LandContracts { get; set; } = []; + public GamingStatusEnum Status { get; set; } = GamingStatusEnum.None; + + public int GetTotalMoney => Money + LandContracts.Sum(x => x.Money + x.HouseMoney); +} diff --git a/Monopoly.Web/Pages/Gaming/GamingPage.razor b/Monopoly.Web/Pages/Gaming/GamingPage.razor index b449770..48665b2 100644 --- a/Monopoly.Web/Pages/Gaming/GamingPage.razor +++ b/Monopoly.Web/Pages/Gaming/GamingPage.razor @@ -1,6 +1,16 @@ -@using Client.Pages.Gaming.Components +@page "/GamingPage" +@using Client.Pages.Gaming.Components +
- + + + + + + + + +
\ No newline at end of file diff --git a/Monopoly.Web/Pages/Gaming/GamingPage.razor.cs b/Monopoly.Web/Pages/Gaming/GamingPage.razor.cs index 35db139..1057cd9 100644 --- a/Monopoly.Web/Pages/Gaming/GamingPage.razor.cs +++ b/Monopoly.Web/Pages/Gaming/GamingPage.razor.cs @@ -1,4 +1,5 @@ -using Client.Pages.Gaming.Entities; +using Client.Pages.Enums; +using Client.Pages.Gaming.Entities; namespace Client.Pages.Gaming; @@ -27,9 +28,56 @@ public partial class GamingPage ]; public Map Map ; + + public IEnumerable Players { get; set; } = []; protected override void OnInitialized() { Map = new Map("1", Blocks); } + + protected override async Task OnInitializedAsync() + { + //假資料 + Players = + [ + new Player + { + Name = "Player1", + Money = 1000, + Color = ColorEnum.Red, + Role = RoleEnum.Baby, + Order = 1, + + IsHost = true + }, + new Player + { + Name = "Player2", + Money = 1000, + Color = ColorEnum.Blue, + Role = RoleEnum.Dai, + Order = 2 + }, + new Player + { + Name = "Player3", + Money = 1000, + Color = ColorEnum.Green, + Role = RoleEnum.Mei, + Order = 3 + }, + new Player + { + Name = "Player4", + Money = 1000, + Color = ColorEnum.Yellow, + Role = RoleEnum.OldMan, + Order = 4 + } + ]; + + //初始化遊戲介面,從Ready轉入Player資料 + + } } diff --git a/Monopoly.Web/Pages/Gaming/GamingPage.razor.cs.bak b/Monopoly.Web/Pages/Gaming/GamingPage.razor.cs.bak new file mode 100644 index 0000000..35db139 --- /dev/null +++ b/Monopoly.Web/Pages/Gaming/GamingPage.razor.cs.bak @@ -0,0 +1,35 @@ +using Client.Pages.Gaming.Entities; + +namespace Client.Pages.Gaming; + +public partial class GamingPage +{ + //private static Block?[][] Blocks => + private static Block?[][] Blocks7x7 => + [ + [new StartPoint("Start"), new Land("A1", lot:"A"), new Station("Station1"), new Land("A2", lot:"A"), new Land("A3", lot:"A"), null, null], + [new Land("F4", lot:"F"), null, null, null, new Land("A4", lot:"A"), null, null], + [new Station("Station4"), null, new Land("B5", lot:"B"), new Land("B6", lot:"B"), new ParkingLot("ParkingLot"), new Land("C1", lot:"C"), new Land("C2", lot:"C")], + [new Land("F3", lot:"F"), null, new Land("B4", lot:"B"), null, new Land("B1", lot:"B"), null, new Land("C3", lot:"C")], + [new Land("F2", lot:"F"), new Land("F1", lot:"F"), new Jail("Jail"), new Land("B3", lot:"B"), new Land("B2", lot:"B"), null, new Station("Station2")], + [null, null, new Land("E3", lot:"E"), null, null, null, new Land("D1", lot:"D")], + [null, null, new Land("E2", lot:"E"), new Land("E1", lot:"E"), new Station("Station3"), new Land("D3", lot:"D"), new Land("D2", lot:"D")], + ]; + + private static Block?[][] Blocks => + //private static Block?[][] Blocks5x9 => + [ + [new StartPoint("Start"), new Land("A1", lot:"A"), new Land("A2", lot:"A"), new Station("Station1"), new Land("A3", lot:"A"), new Land("A4", lot:"A"), new Land("A5", lot:"A"), null, null], + [new Land("D1", lot:"D"), null, null, null, null, null, new Road("R1"), null, null], + [new Station("Station4"), null, null, new Land("B1", lot:"B"), new Land("B2", lot:"B"), new Land("B3", lot:"B"), new ParkingLot("ParkingLot"), new Land("B4", lot:"B"), new Land("B5", lot:"B")], + [new Land("D2", lot:"D"), new Land("D3", lot:"D"), new Land("D4", lot:"D"), new Jail("Jail"), null, null, null, null, new Station("Station2")], + [null, null, null, new Land("C1", lot:"C"), new Land("C2", lot:"C"), new Station("Station3"), new Land("C3", lot:"C"), new Land("C4", lot:"C"), new Road("R2")] + ]; + + public Map Map ; + + protected override void OnInitialized() + { + Map = new Map("1", Blocks); + } +} diff --git a/Monopoly.Web/Pages/Gaming/GamingPage.razor.css b/Monopoly.Web/Pages/Gaming/GamingPage.razor.css index 200deda..53f0d16 100644 --- a/Monopoly.Web/Pages/Gaming/GamingPage.razor.css +++ b/Monopoly.Web/Pages/Gaming/GamingPage.razor.css @@ -1,7 +1,50 @@ +/*.menu-l { + margin: 0; + float: left; + width: 20%; + height: 100dvh; + background-color: dodgerblue; +} + +.content { + margin: 0; + float: left; + width: 60%; + height: 100dvh;*/ + /*background-color: rgb(226, 129, 129);*/ +/*} + +.menu-r { + margin: 0; + float: left; + width: 20%; + height: 100dvh;*/ + /*background-color: cornflowerblue;*/ +/*}*/ + .background { + margin: 0; width: calc(1920 * var(--unit)); height: calc(1080 * var(--unit)); background-image: url('./images/gamepage/background.svg'); background-size: cover; background-position: center; +} + +.menu-l { + position: absolute; + width: calc(1469 * var(--unit)); + height: calc(851 * var(--unit)); + top: calc(113 * var(--unit)); + left: calc(240 * var(--unit)); + background-color: rgb(226, 129, 129); +} + +.content.map { + position: absolute; + width: calc(1469 * var(--unit)); + height: calc(851 * var(--unit)); + top: calc(113 * var(--unit)); + left: calc(240 * var(--unit)); + background-color: rgb(226, 129, 129); } \ No newline at end of file diff --git a/Monopoly.Web/Pages/Ready/Components/ColorChoicePanel.razor b/Monopoly.Web/Pages/Ready/Components/ColorChoicePanel.razor index 59595c0..c83d057 100644 --- a/Monopoly.Web/Pages/Ready/Components/ColorChoicePanel.razor +++ b/Monopoly.Web/Pages/Ready/Components/ColorChoicePanel.razor @@ -1,4 +1,4 @@ -@using Client.Pages.Ready.Entities +@using Client.Pages.Enums
@foreach (var color in new[] { ColorEnum.Blue, ColorEnum.Red, ColorEnum.Yellow, ColorEnum.Green }) { diff --git a/Monopoly.Web/Pages/Ready/Components/ColorChoicePanel.razor.cs b/Monopoly.Web/Pages/Ready/Components/ColorChoicePanel.razor.cs index 8d7eff5..45f984c 100644 --- a/Monopoly.Web/Pages/Ready/Components/ColorChoicePanel.razor.cs +++ b/Monopoly.Web/Pages/Ready/Components/ColorChoicePanel.razor.cs @@ -1,4 +1,5 @@ -using Client.Pages.Ready.Entities; +using Client.Pages.Enums; +using Client.Pages.Ready.Entities; using Microsoft.AspNetCore.Components; namespace Client.Pages.Ready.Components; diff --git a/Monopoly.Web/Pages/Ready/Components/ReadyButton.razor.cs b/Monopoly.Web/Pages/Ready/Components/ReadyButton.razor.cs index 99ae89b..2e31132 100644 --- a/Monopoly.Web/Pages/Ready/Components/ReadyButton.razor.cs +++ b/Monopoly.Web/Pages/Ready/Components/ReadyButton.razor.cs @@ -1,4 +1,5 @@ -using Client.Pages.Ready.Entities; +using Client.Pages.Enums; +using Client.Pages.Ready.Entities; using Microsoft.AspNetCore.Components; namespace Client.Pages.Ready.Components; diff --git a/Monopoly.Web/Pages/Ready/Components/RoleChoicePanel.razor b/Monopoly.Web/Pages/Ready/Components/RoleChoicePanel.razor index 95f40e6..bd4cdb5 100644 --- a/Monopoly.Web/Pages/Ready/Components/RoleChoicePanel.razor +++ b/Monopoly.Web/Pages/Ready/Components/RoleChoicePanel.razor @@ -1,4 +1,4 @@ -@using Client.Pages.Ready.Entities +@using Client.Pages.Enums @if (CurrentPlayer is not null) {
diff --git a/Monopoly.Web/Pages/Ready/Components/RoleChoicePanel.razor.cs b/Monopoly.Web/Pages/Ready/Components/RoleChoicePanel.razor.cs index 090b79e..9bfdad7 100644 --- a/Monopoly.Web/Pages/Ready/Components/RoleChoicePanel.razor.cs +++ b/Monopoly.Web/Pages/Ready/Components/RoleChoicePanel.razor.cs @@ -1,4 +1,5 @@ -using Client.Pages.Ready.Entities; +using Client.Pages.Enums; +using Client.Pages.Ready.Entities; using Microsoft.AspNetCore.Components; namespace Client.Pages.Ready.Components; diff --git a/Monopoly.Web/Pages/Ready/Entities/Player.cs b/Monopoly.Web/Pages/Ready/Entities/Player.cs index 8495375..dae79cd 100644 --- a/Monopoly.Web/Pages/Ready/Entities/Player.cs +++ b/Monopoly.Web/Pages/Ready/Entities/Player.cs @@ -1,4 +1,6 @@ -namespace Client.Pages.Ready.Entities; +using Client.Pages.Enums; + +namespace Client.Pages.Ready.Entities; public class Player { diff --git a/Monopoly.Web/Pages/Ready/ReadyPage.razor.cs b/Monopoly.Web/Pages/Ready/ReadyPage.razor.cs index a6b5b0e..d689080 100644 --- a/Monopoly.Web/Pages/Ready/ReadyPage.razor.cs +++ b/Monopoly.Web/Pages/Ready/ReadyPage.razor.cs @@ -1,4 +1,5 @@ -using Client.Pages.Ready.Components; +using Client.Pages.Enums; +using Client.Pages.Ready.Components; using Client.Pages.Ready.Entities; using Microsoft.AspNetCore.Components; using SharedLibrary.ResponseArgs.Monopoly; diff --git a/Monopoly.Web/wwwroot/images/gamepage/AutoButtun_Off.svg b/Monopoly.Web/wwwroot/images/gamepage/AutoButtun_Off.svg new file mode 100644 index 0000000..ba134a7 --- /dev/null +++ b/Monopoly.Web/wwwroot/images/gamepage/AutoButtun_Off.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/Monopoly.Web/wwwroot/images/gamepage/AutoButtun_On.svg b/Monopoly.Web/wwwroot/images/gamepage/AutoButtun_On.svg new file mode 100644 index 0000000..5b8f5e4 --- /dev/null +++ b/Monopoly.Web/wwwroot/images/gamepage/AutoButtun_On.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/Monopoly.Web/wwwroot/images/gamepage/Go_Default.svg b/Monopoly.Web/wwwroot/images/gamepage/Go_Default.svg new file mode 100644 index 0000000..ec70d0f --- /dev/null +++ b/Monopoly.Web/wwwroot/images/gamepage/Go_Default.svg @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + + diff --git a/Monopoly.Web/wwwroot/images/gamepage/Go_Pressed.svg b/Monopoly.Web/wwwroot/images/gamepage/Go_Pressed.svg new file mode 100644 index 0000000..3d8b15e --- /dev/null +++ b/Monopoly.Web/wwwroot/images/gamepage/Go_Pressed.svg @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/Monopoly.Web/wwwroot/images/gamepage/Icon_Host.svg b/Monopoly.Web/wwwroot/images/gamepage/Icon_Host.svg new file mode 100644 index 0000000..520a68c --- /dev/null +++ b/Monopoly.Web/wwwroot/images/gamepage/Icon_Host.svg @@ -0,0 +1,4 @@ + + + + diff --git a/Monopoly.Web/wwwroot/images/gamepage/Icon_Information.svg b/Monopoly.Web/wwwroot/images/gamepage/Icon_Information.svg new file mode 100644 index 0000000..3b4f8a7 --- /dev/null +++ b/Monopoly.Web/wwwroot/images/gamepage/Icon_Information.svg @@ -0,0 +1,4 @@ + + + + diff --git a/Monopoly.Web/wwwroot/images/gamepage/Icon_Leave.svg b/Monopoly.Web/wwwroot/images/gamepage/Icon_Leave.svg new file mode 100644 index 0000000..a3a2da9 --- /dev/null +++ b/Monopoly.Web/wwwroot/images/gamepage/Icon_Leave.svg @@ -0,0 +1,4 @@ + + + + diff --git a/Monopoly.Web/wwwroot/images/gamepage/Icon_Setting.svg b/Monopoly.Web/wwwroot/images/gamepage/Icon_Setting.svg new file mode 100644 index 0000000..301a248 --- /dev/null +++ b/Monopoly.Web/wwwroot/images/gamepage/Icon_Setting.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/Monopoly.Web/wwwroot/images/gamepage/Ranking_Host.svg b/Monopoly.Web/wwwroot/images/gamepage/Ranking_Host.svg new file mode 100644 index 0000000..fd7ae9e --- /dev/null +++ b/Monopoly.Web/wwwroot/images/gamepage/Ranking_Host.svg @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Monopoly.Web/wwwroot/images/gamepage/Ranking_Item.svg b/Monopoly.Web/wwwroot/images/gamepage/Ranking_Item.svg new file mode 100644 index 0000000..5487f7e --- /dev/null +++ b/Monopoly.Web/wwwroot/images/gamepage/Ranking_Item.svg @@ -0,0 +1,52 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Monopoly.Web/wwwroot/images/gamepage/alarm_clock.svg b/Monopoly.Web/wwwroot/images/gamepage/alarm_clock.svg new file mode 100644 index 0000000..0c648d4 --- /dev/null +++ b/Monopoly.Web/wwwroot/images/gamepage/alarm_clock.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/Monopoly.Web/wwwroot/images/gamepage/background.svg b/Monopoly.Web/wwwroot/images/gamepage/background.svg index 39fe498..a8563c3 100644 --- a/Monopoly.Web/wwwroot/images/gamepage/background.svg +++ b/Monopoly.Web/wwwroot/images/gamepage/background.svg @@ -1,3 +1,4 @@ +<<<<<<< HEAD:Monopoly.Web/wwwroot/images/gamepage/background.svg @@ -5,5 +6,14 @@ +======= + + + + + + + +>>>>>>> feature/Fornt-End_GamePage-Other:Client/wwwroot/images/gamepage/background.svg diff --git a/Monopoly.Web/wwwroot/images/gamepage/icon_mini_home.svg b/Monopoly.Web/wwwroot/images/gamepage/icon_mini_home.svg new file mode 100644 index 0000000..6ef2058 --- /dev/null +++ b/Monopoly.Web/wwwroot/images/gamepage/icon_mini_home.svg @@ -0,0 +1,4 @@ + + + + diff --git a/Monopoly.Web/wwwroot/images/gamepage/icon_mini_money.svg b/Monopoly.Web/wwwroot/images/gamepage/icon_mini_money.svg new file mode 100644 index 0000000..b393487 --- /dev/null +++ b/Monopoly.Web/wwwroot/images/gamepage/icon_mini_money.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/Monopoly.Web/wwwroot/images/gamepage/round.svg b/Monopoly.Web/wwwroot/images/gamepage/round.svg index f0501c4..f43cc80 100644 --- a/Monopoly.Web/wwwroot/images/gamepage/round.svg +++ b/Monopoly.Web/wwwroot/images/gamepage/round.svg @@ -1,13 +1,15 @@ - - - - + + + + - - - - - - - + + + + + + + + +