Skip to content

Commit

Permalink
backlog minigame
Browse files Browse the repository at this point in the history
  • Loading branch information
pedroyen21 committed Sep 9, 2024
1 parent 0da3c46 commit cda6e7b
Show file tree
Hide file tree
Showing 26 changed files with 222 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ dest_files=["res://.godot/imported/AnonymousPro-Bold.ttf-9d8fef4d357af5b52cd60af
Rendering=null
antialiasing=1
generate_mipmaps=false
disable_embedded_bitmaps=true
multichannel_signed_distance_field=false
msdf_pixel_range=8
msdf_size=48
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ dest_files=["res://.godot/imported/AnonymousPro-BoldItalic.ttf-4274bf704d3d6b9cd
Rendering=null
antialiasing=1
generate_mipmaps=false
disable_embedded_bitmaps=true
multichannel_signed_distance_field=false
msdf_pixel_range=8
msdf_size=48
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ dest_files=["res://.godot/imported/AnonymousPro-Italic.ttf-9989590b02137b799e13d
Rendering=null
antialiasing=1
generate_mipmaps=false
disable_embedded_bitmaps=true
multichannel_signed_distance_field=false
msdf_pixel_range=8
msdf_size=48
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ dest_files=["res://.godot/imported/AnonymousPro-Regular.ttf-856c843fd6f89964d2ca
Rendering=null
antialiasing=1
generate_mipmaps=false
disable_embedded_bitmaps=true
multichannel_signed_distance_field=false
msdf_pixel_range=8
msdf_size=48
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ dest_files=["res://.godot/imported/CourierPrime-Bold.ttf-1f003c66d63ebed70964e77
Rendering=null
antialiasing=1
generate_mipmaps=false
disable_embedded_bitmaps=true
multichannel_signed_distance_field=false
msdf_pixel_range=8
msdf_size=48
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ dest_files=["res://.godot/imported/CourierPrime-BoldItalic.ttf-65ebcc61dd5e1dfa8
Rendering=null
antialiasing=1
generate_mipmaps=false
disable_embedded_bitmaps=true
multichannel_signed_distance_field=false
msdf_pixel_range=8
msdf_size=48
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ dest_files=["res://.godot/imported/CourierPrime-Italic.ttf-baa9156a73770735a0f72
Rendering=null
antialiasing=1
generate_mipmaps=false
disable_embedded_bitmaps=true
multichannel_signed_distance_field=false
msdf_pixel_range=8
msdf_size=48
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ dest_files=["res://.godot/imported/CourierPrime-Regular.ttf-3babe7e4a7a588dfc9a8
Rendering=null
antialiasing=1
generate_mipmaps=false
disable_embedded_bitmaps=true
multichannel_signed_distance_field=false
msdf_pixel_range=8
msdf_size=48
Expand Down
1 change: 1 addition & 0 deletions Crystalleum 2/addons/gut/fonts/LobsterTwo-Bold.ttf.import
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ dest_files=["res://.godot/imported/LobsterTwo-Bold.ttf-7c7f734103b58a32491a47881
Rendering=null
antialiasing=1
generate_mipmaps=false
disable_embedded_bitmaps=true
multichannel_signed_distance_field=false
msdf_pixel_range=8
msdf_size=48
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ dest_files=["res://.godot/imported/LobsterTwo-BoldItalic.ttf-227406a33e84448e6aa
Rendering=null
antialiasing=1
generate_mipmaps=false
disable_embedded_bitmaps=true
multichannel_signed_distance_field=false
msdf_pixel_range=8
msdf_size=48
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ dest_files=["res://.godot/imported/LobsterTwo-Italic.ttf-f93abf6c25390c85ad5fb6c
Rendering=null
antialiasing=1
generate_mipmaps=false
disable_embedded_bitmaps=true
multichannel_signed_distance_field=false
msdf_pixel_range=8
msdf_size=48
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ dest_files=["res://.godot/imported/LobsterTwo-Regular.ttf-f3fcfa01cd671c8da433dd
Rendering=null
antialiasing=1
generate_mipmaps=false
disable_embedded_bitmaps=true
multichannel_signed_distance_field=false
msdf_pixel_range=8
msdf_size=48
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ dest_files=["res://.godot/imported/conthrax-sb.otf-f0faaff9f37a6f9bd3e2838da525a
Rendering=null
antialiasing=1
generate_mipmaps=false
disable_embedded_bitmaps=true
multichannel_signed_distance_field=false
msdf_pixel_range=8
msdf_size=48
Expand Down
1 change: 1 addition & 0 deletions Crystalleum 2/assets/fontes/crang/Crang.ttf.import
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ dest_files=["res://.godot/imported/Crang.ttf-38dedd4435dc466326b1b9ba04d9c4e2.fo
Rendering=null
antialiasing=1
generate_mipmaps=false
disable_embedded_bitmaps=true
multichannel_signed_distance_field=false
msdf_pixel_range=8
msdf_size=48
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ dest_files=["res://.godot/imported/rainyhearts.ttf-98bce0f468f6293d58510ba522dd2
Rendering=null
antialiasing=1
generate_mipmaps=false
disable_embedded_bitmaps=true
multichannel_signed_distance_field=false
msdf_pixel_range=8
msdf_size=48
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ dest_files=["res://.godot/imported/Starjedi.ttf-e19769b33b5b60584478850d678df9f4
Rendering=null
antialiasing=1
generate_mipmaps=false
disable_embedded_bitmaps=true
multichannel_signed_distance_field=false
msdf_pixel_range=8
msdf_size=48
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ dest_files=["res://.godot/imported/Starjhol.ttf-e6f04cbe0a954386870cfc25bc0a30b1
Rendering=null
antialiasing=1
generate_mipmaps=false
disable_embedded_bitmaps=true
multichannel_signed_distance_field=false
msdf_pixel_range=8
msdf_size=48
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ dest_files=["res://.godot/imported/Starjout.ttf-a82aa0930225e69cf273642068465542
Rendering=null
antialiasing=1
generate_mipmaps=false
disable_embedded_bitmaps=true
multichannel_signed_distance_field=false
msdf_pixel_range=8
msdf_size=48
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ dest_files=["res://.godot/imported/STJEDISE.TTF-0d9e3205b103217e41802c4215924d6d
Rendering=null
antialiasing=1
generate_mipmaps=false
disable_embedded_bitmaps=true
multichannel_signed_distance_field=false
msdf_pixel_range=8
msdf_size=48
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ dest_files=["res://.godot/imported/Stjldbl1.ttf-87147182cc4625c078067d5a000bc6ac
Rendering=null
antialiasing=1
generate_mipmaps=false
disable_embedded_bitmaps=true
multichannel_signed_distance_field=false
msdf_pixel_range=8
msdf_size=48
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ dest_files=["res://.godot/imported/Stjldbl2.ttf-ec4f3021634d3dcc83f7f768ef649caa
Rendering=null
antialiasing=1
generate_mipmaps=false
disable_embedded_bitmaps=true
multichannel_signed_distance_field=false
msdf_pixel_range=8
msdf_size=48
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ dest_files=["res://.godot/imported/Strjmono.ttf-e73afbbf1f4e0ad6853560b9034ad479
Rendering=null
antialiasing=1
generate_mipmaps=false
disable_embedded_bitmaps=true
multichannel_signed_distance_field=false
msdf_pixel_range=8
msdf_size=48
Expand Down
128 changes: 128 additions & 0 deletions Crystalleum 2/backlog.gd
Original file line number Diff line number Diff line change
@@ -0,0 +1,128 @@
extends Node2D

# Ordem correta das User Stories
var correct_order = [5, 4, 2, 6, 1, 3]
# 1 2 3 4 5 6
# 5, 4, 2, 6, 3, 1

# Ordem clicada pelo jogador
var user_order = []
var show_order = []

func _reset_game():
# Limpa a ordem do jogador para nova tentativa
user_order.clear()
show_order.clear()


func _on_us_1_pressed() -> void:
user_order.push_back(5)
show_order.push_back(1)
$Label.text = "Ordem escolhida: " + str(show_order)
$VBoxContainer/US1.disabled = true


func _on_us_2_pressed() -> void:
user_order.push_back(3)
show_order.push_back(2)
$Label.text = "Ordem escolhida: " + str(show_order)
$VBoxContainer/US2.disabled = true

func _on_us_3_pressed() -> void:
user_order.push_back(6)
show_order.push_back(3)
$Label.text = "Ordem escolhida: " + str(show_order)
$VBoxContainer/US3.disabled = true


func _on_us_4_pressed() -> void:
user_order.push_back(2)
show_order.push_back(4)
$Label.text = "Ordem escolhida: " + str(show_order)
$VBoxContainer/US4.disabled = true

func _on_us_5_pressed() -> void:
user_order.push_back(1)
show_order.push_back(5)
$Label.text = "Ordem escolhida: " + str(show_order)
$VBoxContainer/US5.disabled = true # Replace with function body.

func _on_us_6_pressed() -> void:
user_order.push_back(4)
show_order.push_back(6)
$Label.text = "Ordem escolhida: " + str(show_order)
$VBoxContainer/US6.disabled = true

func _avancar() -> void:
print(calcula_inversoes())
get_tree().change_scene_to_file('res://addons/gut/gui/BottomPanelShortcuts.tscn')


var inversions = 0

# Função merge para unir dois subarrays
func merge(arr, left, mid, right):
var n1 = mid - left + 1
var n2 = right - mid

# Vetores temporários L e R
var L = []
var R = []

# Preenche os vetores temporários
for i in range(n1):
L.append(arr[left + i])
for j in range(n2):
R.append(arr[mid + 1 + j])

var i = 0
var j = 0
var k = left
var inv1 = n1

# Mescla os vetores temporários de volta no array original
while i < n1 and j < n2:
if L[i] <= R[j]:
arr[k] = L[i]
inv1 -= 1
i += 1
else:
inversions += inv1
arr[k] = R[j]
j += 1
k += 1

# Copia os elementos restantes de L[]
while i < n1:
arr[k] = L[i]
i += 1
k += 1

# Copia os elementos restantes de R[]
while j < n2:
arr[k] = R[j]
j += 1
k += 1

# Função mergeSort para dividir e ordenar o array
func merge_sort(arr, left, right):
if left >= right:
return
var mid = left + (right - left) / 2
merge_sort(arr, left, mid)
merge_sort(arr, mid + 1, right)
merge(arr, left, mid, right)

# Função principal para rodar o algoritmo
func calcula_inversoes():
var n = 6

print("Vetor original:")
print(user_order)

merge_sort(user_order, 0, n - 1)

print("\nVetor ordenado:")
print("\nInversões:")
print(inversions)
return inversions
70 changes: 70 additions & 0 deletions Crystalleum 2/scenes/backlog.tscn
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
[gd_scene load_steps=2 format=3 uid="uid://c5stmgcyytu8u"]

[ext_resource type="Script" path="res://backlog.gd" id="1_bp8u5"]

[node name="Backlog" type="Node2D"]
position = Vector2(-1, -3)
script = ExtResource("1_bp8u5")

[node name="Label" type="Label" parent="."]
offset_left = 4.0
offset_top = 134.0
offset_right = 323.0
offset_bottom = 147.0
theme_override_font_sizes/font_size = 9
text = "Ordem escolhida: "

[node name="VBoxContainer" type="VBoxContainer" parent="."]
offset_left = 2.0
offset_top = 5.0
offset_right = 319.0
offset_bottom = 127.0

[node name="US1" type="Button" parent="VBoxContainer"]
layout_mode = 2
theme_override_font_sizes/font_size = 5
text = "1 - Eu, como candidato, quero consultar meu status para saber se obtive êxito no teste de apitdão
"

[node name="US2" type="Button" parent="VBoxContainer"]
layout_mode = 2
theme_override_font_sizes/font_size = 5
text = "2 - Eu, como administrador, quero consultar os candidatos por aptidão para organizar meu fluxo de trabalho
"

[node name="US3" type="Button" parent="VBoxContainer"]
layout_mode = 2
theme_override_font_sizes/font_size = 5
text = "3 - Eu, como administrador quero alocar pessoas em planetas para combater as corporações eficientemente
"

[node name="US4" type="Button" parent="VBoxContainer"]
layout_mode = 2
theme_override_font_sizes/font_size = 5
text = "4 - Eu, como candidato, quero fazer um teste de aptidão para definir meus atributos"

[node name="US5" type="Button" parent="VBoxContainer"]
layout_mode = 2
theme_override_font_sizes/font_size = 5
text = "5 - Eu, como candidato, quero me cadastrar no sistema da resistência para servir a galáxia"

[node name="US6" type="Button" parent="VBoxContainer"]
layout_mode = 2
theme_override_font_sizes/font_size = 5
text = "6 - Eu, como administrador, quero aprovar candidados com base em suas aptidões para filtrar os ingressantes"

[node name="Avançar" type="Button" parent="."]
offset_left = 264.0
offset_top = 151.0
offset_right = 316.0
offset_bottom = 175.0
theme_override_font_sizes/font_size = 11
text = "Avançar"

[connection signal="pressed" from="VBoxContainer/US1" to="." method="_on_us_1_pressed"]
[connection signal="pressed" from="VBoxContainer/US2" to="." method="_on_us_2_pressed"]
[connection signal="pressed" from="VBoxContainer/US3" to="." method="_on_us_3_pressed"]
[connection signal="pressed" from="VBoxContainer/US4" to="." method="_on_us_4_pressed"]
[connection signal="pressed" from="VBoxContainer/US5" to="." method="_on_us_5_pressed"]
[connection signal="pressed" from="VBoxContainer/US6" to="." method="_on_us_6_pressed"]
[connection signal="pressed" from="Avançar" to="." method="_avancar"]
1 change: 1 addition & 0 deletions Crystalleum 2/scripts/Menu.gd
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,4 @@ func _on_config_pressed():

func _on_sair_pressed():
get_tree().quit()

2 changes: 1 addition & 1 deletion docs/missao2/backlog.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ Uma breve descrição de cada coluna:
| 10 | Aspectos Humanos | Minigame de organização de equipe | Eu como jogador, quero ver os atributos da equipe como um todo | 9 |
| 11| Backlog | Introdução | Eu como usuário, quero ler uma introdução sobre a fase de backlog | 3 |
|12| Backlog | Minigame de backlog | Eu como usuário, quero visualizar o backlog do software a ser desenvolvido pela equipe de desenvolvimento da gamificação | 10 |
| 13| Backlog | Minigame de backlog | Eu como usuário, quero ordenar o backlog do software a ser desenvolvido pela equipe de desenvolvimento da gamificação utilizando o método COOrg | 11 |
| 13| Backlog | Minigame de backlog | Eu como usuário, quero ordenar o backlog do software a ser desenvolvido pela equipe de desenvolvimento | 11 |
| 14 | Backlog | Minigame de escolha de PBI com modelo ARO | Eu como usuário, quero ver uma lista de PBI | 12 |
| 15 | Backlog | Minigame de escolha de PBI com modelo ARO | Eu como usuário, quero identificar os que estão escritos em modelo ARO | 13 |
| 16 | Backlog | Pergunta de backlog com USM | Eu como usuário, quero ler a pergunta sobre USM | 16 |
Expand Down

0 comments on commit cda6e7b

Please sign in to comment.