NEW: MIH MineSweeper Package pt4
This commit is contained in:
@@ -274,7 +274,7 @@ class _MineSweeperGameState extends State<MineSweeperGame> {
|
|||||||
alertBody: Column(
|
alertBody: Column(
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
"Your lost this game of MIH MineSweeper!!!",
|
"Your lost this game of MIH Minesweeper!!!",
|
||||||
textAlign: TextAlign.center,
|
textAlign: TextAlign.center,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 20,
|
fontSize: 20,
|
||||||
@@ -405,7 +405,7 @@ class _MineSweeperGameState extends State<MineSweeperGame> {
|
|||||||
alertBody: Column(
|
alertBody: Column(
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
"Your won this game of MIH MineSweeper!!!",
|
"Your won this game of MIH Minesweeper!!!",
|
||||||
textAlign: TextAlign.center,
|
textAlign: TextAlign.center,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 20,
|
fontSize: 20,
|
||||||
@@ -565,14 +565,18 @@ class _MineSweeperGameState extends State<MineSweeperGame> {
|
|||||||
MihMineSweeperProvider mihMineSweeperProvider,
|
MihMineSweeperProvider mihMineSweeperProvider,
|
||||||
MihBannerAdProvider adProvider,
|
MihBannerAdProvider adProvider,
|
||||||
Widget? child) {
|
Widget? child) {
|
||||||
return Stack(
|
return Column(
|
||||||
|
children: [
|
||||||
|
Expanded(
|
||||||
|
child: Stack(
|
||||||
alignment: Alignment.topCenter,
|
alignment: Alignment.topCenter,
|
||||||
children: [
|
children: [
|
||||||
MihSingleChildScroll(
|
MihSingleChildScroll(
|
||||||
child: board.isEmpty && squaresLeft < 0
|
child: board.isEmpty && squaresLeft < 0
|
||||||
// Start Up Message before setting up game
|
// Start Up Message before setting up game
|
||||||
? Padding(
|
? Padding(
|
||||||
padding: const EdgeInsets.symmetric(horizontal: 10.0),
|
padding:
|
||||||
|
const EdgeInsets.symmetric(horizontal: 10.0),
|
||||||
child: Column(
|
child: Column(
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
crossAxisAlignment: CrossAxisAlignment.center,
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
@@ -582,7 +586,9 @@ class _MineSweeperGameState extends State<MineSweeperGame> {
|
|||||||
MihIcons.mineSweeper,
|
MihIcons.mineSweeper,
|
||||||
size: 165,
|
size: 165,
|
||||||
color: MihColors.getSecondaryColor(
|
color: MihColors.getSecondaryColor(
|
||||||
MzansiInnovationHub.of(context)!.theme.mode ==
|
MzansiInnovationHub.of(context)!
|
||||||
|
.theme
|
||||||
|
.mode ==
|
||||||
"Dark"),
|
"Dark"),
|
||||||
),
|
),
|
||||||
const SizedBox(height: 10),
|
const SizedBox(height: 10),
|
||||||
@@ -594,7 +600,9 @@ class _MineSweeperGameState extends State<MineSweeperGame> {
|
|||||||
fontSize: 25,
|
fontSize: 25,
|
||||||
fontWeight: FontWeight.bold,
|
fontWeight: FontWeight.bold,
|
||||||
color: MihColors.getSecondaryColor(
|
color: MihColors.getSecondaryColor(
|
||||||
MzansiInnovationHub.of(context)!.theme.mode ==
|
MzansiInnovationHub.of(context)!
|
||||||
|
.theme
|
||||||
|
.mode ==
|
||||||
"Dark"),
|
"Dark"),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@@ -615,7 +623,8 @@ class _MineSweeperGameState extends State<MineSweeperGame> {
|
|||||||
children: [
|
children: [
|
||||||
TextSpan(text: "Press "),
|
TextSpan(text: "Press "),
|
||||||
WidgetSpan(
|
WidgetSpan(
|
||||||
alignment: PlaceholderAlignment.middle,
|
alignment:
|
||||||
|
PlaceholderAlignment.middle,
|
||||||
child: Icon(
|
child: Icon(
|
||||||
Icons.menu,
|
Icons.menu,
|
||||||
size: 20,
|
size: 20,
|
||||||
@@ -643,7 +652,8 @@ class _MineSweeperGameState extends State<MineSweeperGame> {
|
|||||||
children: [
|
children: [
|
||||||
// Display game status
|
// Display game status
|
||||||
Row(
|
Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
mainAxisAlignment:
|
||||||
|
MainAxisAlignment.spaceEvenly,
|
||||||
children: [
|
children: [
|
||||||
Expanded(
|
Expanded(
|
||||||
child: Padding(
|
child: Padding(
|
||||||
@@ -679,7 +689,8 @@ class _MineSweeperGameState extends State<MineSweeperGame> {
|
|||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 24,
|
fontSize: 24,
|
||||||
fontWeight: FontWeight.bold,
|
fontWeight: FontWeight.bold,
|
||||||
color: getDifficultyColor(mihMineSweeperProvider),
|
color: getDifficultyColor(
|
||||||
|
mihMineSweeperProvider),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
||||||
@@ -714,15 +725,18 @@ class _MineSweeperGameState extends State<MineSweeperGame> {
|
|||||||
|
|
||||||
return MineTile(
|
return MineTile(
|
||||||
square: board[r][c],
|
square: board[r][c],
|
||||||
onTap: () => handleTap(profileProvider,
|
onTap: () => handleTap(
|
||||||
mihMineSweeperProvider, adProvider, r, c),
|
profileProvider,
|
||||||
|
mihMineSweeperProvider,
|
||||||
|
adProvider,
|
||||||
|
r,
|
||||||
|
c),
|
||||||
onLongPress: () => handleLongPress(r, c),
|
onLongPress: () => handleLongPress(r, c),
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
SizedBox(height: 30),
|
SizedBox(height: 30),
|
||||||
MihBannerAd(),
|
|
||||||
// const SizedBox(height: 100),
|
// const SizedBox(height: 100),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
@@ -780,12 +794,18 @@ class _MineSweeperGameState extends State<MineSweeperGame> {
|
|||||||
MzansiInnovationHub.of(context)!.theme.mode ==
|
MzansiInnovationHub.of(context)!.theme.mode ==
|
||||||
"Dark"),
|
"Dark"),
|
||||||
onTap: () {
|
onTap: () {
|
||||||
showStartGameWindow(mihMineSweeperProvider, adProvider);
|
showStartGameWindow(
|
||||||
|
mihMineSweeperProvider, adProvider);
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
]),
|
]),
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
MihBannerAd(),
|
||||||
|
SizedBox(height: 15),
|
||||||
|
],
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user