From 75ba336fbc8901e76ce722727a810ab5edb74ce7 Mon Sep 17 00:00:00 2001 From: Valdinei Ferreira Date: Tue, 9 Jan 2018 09:27:21 -0300 Subject: [PATCH 01/15] =?UTF-8?q?Adi=C3=A7=C3=A3o=20de=20f=C3=B3rmul=C3=A1?= =?UTF-8?q?rio=20inicial=20(usando=20o=20GET)=20*=20Label=20adicionada=20*?= =?UTF-8?q?=20Caixa=20de=20texto=20adicionada=20*=20Bot=C3=A3o=20submit=20?= =?UTF-8?q?adicionado?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Game/config.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Game/config.php b/Game/config.php index c0eff82..62590bb 100644 --- a/Game/config.php +++ b/Game/config.php @@ -25,3 +25,8 @@ */ ?> +
+
+ + +
From c583ffbb6ce10a823fe88c3439f738a25c831d11 Mon Sep 17 00:00:00 2001 From: Valdinei Ferreira Date: Tue, 9 Jan 2018 09:47:56 -0300 Subject: [PATCH 02/15] =?UTF-8?q?remover=20controles=20do=20input=20e=20ou?= =?UTF-8?q?tras=20altera=C3=A7=C3=B5es?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Game/config.php | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/Game/config.php b/Game/config.php index 62590bb..3d95f7f 100644 --- a/Game/config.php +++ b/Game/config.php @@ -25,8 +25,19 @@ */ ?> + +

The Game

-
+
From e3b0c7468dc9dcd57b10a6eab7d6272591c69123 Mon Sep 17 00:00:00 2001 From: Valdinei Ferreira Date: Tue, 9 Jan 2018 09:52:34 -0300 Subject: [PATCH 03/15] =?UTF-8?q?config.php=20conclu=C3=ADdo=20de=20acordo?= =?UTF-8?q?=20com=20as=204=20instru=C3=A7=C3=B5es?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Game/config.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Game/config.php b/Game/config.php index 3d95f7f..18c0a82 100644 --- a/Game/config.php +++ b/Game/config.php @@ -38,6 +38,6 @@

The Game


- +
From afdf7ef64537734c8e5aa66655afb73ed456285c Mon Sep 17 00:00:00 2001 From: Valdinei Ferreira Date: Tue, 9 Jan 2018 10:39:50 -0300 Subject: [PATCH 04/15] add valor minimo e valor da variavel jogadores --- Game/config.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Game/config.php b/Game/config.php index 18c0a82..88ef84a 100644 --- a/Game/config.php +++ b/Game/config.php @@ -32,12 +32,11 @@ input[type=number] { -moz-appearance: textfield; appearance: textfield; - margin: 0; }

The Game


- +
From 478a37e952980dfc52c2b340df712f2eb575070a Mon Sep 17 00:00:00 2001 From: Valdinei Ferreira Date: Tue, 9 Jan 2018 11:43:37 -0300 Subject: [PATCH 05/15] funcaoCheck finalizado --- Game/funcaoCheck.php | 25 +++++++------------------ 1 file changed, 7 insertions(+), 18 deletions(-) diff --git a/Game/funcaoCheck.php b/Game/funcaoCheck.php index da8b133..158d46e 100644 --- a/Game/funcaoCheck.php +++ b/Game/funcaoCheck.php @@ -1,19 +1,8 @@ 10) + return false; + else + return true; +} +?> From 17bad8220e2965dcdcb34311cc563a0868864149 Mon Sep 17 00:00:00 2001 From: Valdinei Ferreira Date: Tue, 9 Jan 2018 12:05:23 -0300 Subject: [PATCH 06/15] alteracoes gerais --- Game/config.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Game/config.php b/Game/config.php index 88ef84a..9025c92 100644 --- a/Game/config.php +++ b/Game/config.php @@ -35,7 +35,7 @@ }

The Game

-
+
From 3aeb5b4b09b14ca1722780240fb7e6e40ad54145 Mon Sep 17 00:00:00 2001 From: Valdinei Ferreira Date: Tue, 9 Jan 2018 12:06:49 -0300 Subject: [PATCH 07/15] arquivo check.php adicionado --- Game/check.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/Game/check.php b/Game/check.php index 264ae82..bc4e576 100644 --- a/Game/check.php +++ b/Game/check.php @@ -21,4 +21,15 @@ "home.php?user=" . $user */ +session_start(); +$_SESSION['jogadores'] = $_GET['jogadores']; +require_once('funcaoCheck.php'); + +if (analise($_SESSION['jogadores'])) { + header('Location: /Game/coluna.php'); + exit; +} else { + header('Location: /Game/config.php?jogadores=' . $_GET['jogadores']); + exit; +} ?> From 98c1ef5562ea08d0edc521dae80957c601a6dc59 Mon Sep 17 00:00:00 2001 From: Valdinei Ferreira Date: Thu, 11 Jan 2018 09:39:56 -0300 Subject: [PATCH 08/15] ajustes gerais no config.php --- Game/config.php | 67 ++++++++++++++++++------------------------------- 1 file changed, 25 insertions(+), 42 deletions(-) diff --git a/Game/config.php b/Game/config.php index 9025c92..54efca0 100644 --- a/Game/config.php +++ b/Game/config.php @@ -1,42 +1,25 @@ - - -3 - A variavél "jogadores", representa o Numero de Jogadores, logo a -
- - Veja que tem a letra X, essa letra X deve ser substituida por uma variavel em PHP. - - O objetivo dessa função é recebido o número 3 como parâmetro, ela deve imprimir 3x a string acima, - onde o X vai de 1 a 3. O resultado final depos da chamada da função seria isso: - - -
- -
- -
- - Dica: Provavelmente você usará alguma estrutura de repetição nessa tarefa e o recurso de concatenação de Strings. +function escreveInput($var) { + for ($i=1; $i<=$var; $i++) { +?> + +
+ \ No newline at end of file From 03d06b8e10a4801b4df0e3e6651ceb24943c6542 Mon Sep 17 00:00:00 2001 From: Valdinei Ferreira Date: Thu, 11 Jan 2018 09:48:14 -0300 Subject: [PATCH 11/15] arquivo coluna.php finalizado --- Game/coluna.php | 29 ++++++++++++++++++----------- 1 file changed, 18 insertions(+), 11 deletions(-) diff --git a/Game/coluna.php b/Game/coluna.php index e578835..a0f9bfa 100644 --- a/Game/coluna.php +++ b/Game/coluna.php @@ -1,12 +1,19 @@ + + + + + + Pontuações + + +

Pontuação dos Jogadores

+
+ +
+
+ + \ No newline at end of file From 9978c357ceec3bfab17a9d3e405825ae7c542d74 Mon Sep 17 00:00:00 2001 From: Valdinei Ferreira Date: Thu, 11 Jan 2018 10:01:57 -0300 Subject: [PATCH 12/15] arquivo resultado.php finalizado --- Game/resultado.php | 43 ++++++++++++------------------------------- 1 file changed, 12 insertions(+), 31 deletions(-) diff --git a/Game/resultado.php b/Game/resultado.php index 4aa569f..4bda4bd 100644 --- a/Game/resultado.php +++ b/Game/resultado.php @@ -1,35 +1,16 @@ O Jogador X foi o Vencedor com Y pontos - -Onde o X é a chave do jogador no Array $_POST e Y é a quantidade de pontos desse jogador. - -E como escolheremos o vencedor aleatoriamente? Bom... essa é a sua missão! Ache uma forma de escolher um valor no Array aleatoriamente. - - Dica: Pense no que você quer... para buscar no Google. O que você quer fazer? Não desanime! A resposta para esse nosso problema está no https://secure.php.net - -1 - Escolha algum jogador aleatoriamente no Array do POST para ser o Vencedor - -2 - Imprima a seguinte String: - -

O Jogador X foi o Vencedor com Y pontos

- - Dica: Lembre-se que você usará o poder da Concatenação de String +echo "

O Jogador " . $jog . " foi o Vencedor com " . $_POST[$pts] . " pontos

"; +?> \ No newline at end of file From 826fcb82c6bf71af71274deec2741e75571fe535 Mon Sep 17 00:00:00 2001 From: Valdinei Ferreira Date: Thu, 11 Jan 2018 10:04:13 -0300 Subject: [PATCH 13/15] ajustes finais --- Game/resultado.php | 36 ++++++++++++++++++++++-------------- 1 file changed, 22 insertions(+), 14 deletions(-) diff --git a/Game/resultado.php b/Game/resultado.php index 4bda4bd..3c7f6e2 100644 --- a/Game/resultado.php +++ b/Game/resultado.php @@ -1,16 +1,24 @@ - + + + + + Resultado + + + O Jogador " . $jog . " foi o Vencedor com " . $_POST[$pts] . " pontos"; -?> \ No newline at end of file + echo "

O Jogador " . $jog . " foi o Vencedor com " . $_POST[$pts] . " pontos

"; + ?> + + \ No newline at end of file From 65c25c8ba4c6a3e1bc37413052e1f4fd606dc2ec Mon Sep 17 00:00:00 2001 From: Valdinei Ferreira Date: Thu, 11 Jan 2018 10:43:46 -0300 Subject: [PATCH 14/15] =?UTF-8?q?codigo=20melhor=20para=20finalizacao=20do?= =?UTF-8?q?=20arquivo,=20tirando=20o=20la=C3=A7o=20'for'=20e=20usando=20ap?= =?UTF-8?q?enas=20uma=20variavel?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Game/resultado.php | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/Game/resultado.php b/Game/resultado.php index 3c7f6e2..1bfed46 100644 --- a/Game/resultado.php +++ b/Game/resultado.php @@ -8,17 +8,9 @@ O Jogador " . $jog . " foi o Vencedor com " . $_POST[$pts] . " pontos"; + echo "

O Jogador " . $jog . " foi o Vencedor com " . $_POST[$jog] . " pontos

"; ?> \ No newline at end of file From a1cda567039afd985fb265fbab813007bee4140b Mon Sep 17 00:00:00 2001 From: Valdinei Ferreira Date: Thu, 11 Jan 2018 10:44:41 -0300 Subject: [PATCH 15/15] =?UTF-8?q?ajustes=20gerais=20no=20estilo=20da=20p?= =?UTF-8?q?=C3=A1gina=20(para=20n=C3=A3o=20ficar=20t=C3=A3o=20crua)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Game/coluna.php | 12 ++++++++++++ Game/config.php | 3 +++ Game/funcaoColuna.php | 2 +- Game/resultado.php | 5 +++++ 4 files changed, 21 insertions(+), 1 deletion(-) diff --git a/Game/coluna.php b/Game/coluna.php index a0f9bfa..7669ff1 100644 --- a/Game/coluna.php +++ b/Game/coluna.php @@ -8,6 +8,18 @@ Pontuações +

Pontuação dos Jogadores

diff --git a/Game/config.php b/Game/config.php index 54efca0..6c214a1 100644 --- a/Game/config.php +++ b/Game/config.php @@ -12,6 +12,9 @@ -moz-appearance: textfield; appearance: textfield; } + html, body { + font-family: 'Segoe UI', sans-serif; + } diff --git a/Game/funcaoColuna.php b/Game/funcaoColuna.php index 6a17b1f..6049f00 100644 --- a/Game/funcaoColuna.php +++ b/Game/funcaoColuna.php @@ -3,7 +3,7 @@ function escreveInput($var) { for ($i=1; $i<=$var; $i++) { ?> -
+
Resultado +