Spaces:
Running
Running
File size: 60,443 Bytes
ff677bf | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 | <!DOCTYPE html>
<html lang="pt-BR">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Startup Empire - Simulador de Negócios</title>
<script src="https://cdn.tailwindcss.com"></script>
<script src="https://kit.fontawesome.com/a076d05399.js" crossorigin="anonymous"></script>
<style>
@keyframes pulse {
0% { transform: scale(1); }
50% { transform: scale(1.05); }
100% { transform: scale(1); }
}
.pulse-effect {
animation: pulse 2s infinite;
}
.progress-bar {
transition: width 0.5s ease-in-out;
}
.modal {
transition: all 0.3s ease-out;
opacity: 0;
visibility: hidden;
}
.modal.active {
opacity: 1;
visibility: visible;
}
.choice-card:hover {
transform: translateY(-5px);
box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}
.typewriter {
overflow: hidden;
border-right: .15em solid #3B82F6;
white-space: nowrap;
margin: 0 auto;
letter-spacing: .15em;
animation: typing 3.5s steps(40, end), blink-caret .75s step-end infinite;
}
@keyframes typing {
from { width: 0 }
to { width: 100% }
}
@keyframes blink-caret {
from, to { border-color: transparent }
50% { border-color: #3B82F6 }
}
</style>
</head>
<body class="bg-gray-100 font-sans">
<div class="container mx-auto px-4 py-8 max-w-6xl">
<!-- Header -->
<header class="mb-8 text-center">
<h1 class="text-4xl md:text-5xl font-bold text-blue-600 mb-2">Startup Empire</h1>
<p class="text-gray-600 text-lg">Construa seu império empresarial! Tome decisões estratégicas e veja seu negócio crescer.</p>
</header>
<!-- Game Container -->
<div class="bg-white rounded-xl shadow-lg overflow-hidden mb-8">
<!-- Status Bar -->
<div class="bg-gradient-to-r from-blue-500 to-blue-700 p-4 text-white flex flex-wrap justify-between items-center">
<div class="w-full sm:w-auto mb-4 sm:mb-0">
<h2 class="text-xl font-bold mb-1">Seu Negócio: <span id="business-type" class="bg-blue-800 px-2 py-1 rounded">Ainda não definido</span></h2>
<div class="flex items-center">
<span class="mr-2">Nível: <span id="level" class="font-bold">1</span></span>
<div class="w-32 bg-blue-200 rounded-full h-2.5">
<div id="level-progress" class="bg-yellow-400 h-2.5 rounded-full progress-bar" style="width: 0%"></div>
</div>
</div>
</div>
<div class="flex flex-wrap gap-4 w-full sm:w-auto justify-between">
<div>
<div class="flex items-center">
<i class="fas fa-coins text-yellow-300 mr-1"></i>
<span>Capital: R$<span id="capital">50,000</span></span>
</div>
<div class="w-full bg-blue-200 rounded-full h-1.5">
<div id="money-bar" class="bg-green-500 h-1.5 rounded-full progress-bar" style="width: 100%"></div>
</div>
</div>
<div>
<div class="flex items-center">
<i class="fas fa-users text-blue-200 mr-1"></i>
<span>Clientes: <span id="customers">0</span></span>
</div>
<div class="w-full bg-blue-200 rounded-full h-1.5">
<div id="customer-bar" class="bg-purple-500 h-1.5 rounded-full progress-bar" style="width: 0%"></div>
</div>
</div>
<div>
<div class="flex items-center">
<i class="fas fa-star text-yellow-300 mr-1"></i>
<span>Reputação: <span id="reputation">50</span>/100</span>
</div>
<div class="w-full bg-blue-200 rounded-full h-1.5">
<div id="reputation-bar" class="bg-red-500 h-1.5 rounded-full progress-bar" style="width: 50%"></div>
</div>
</div>
</div>
</div>
<!-- Main Content -->
<div class="p-6 md:p-8">
<!-- Event Display -->
<div class="bg-gray-50 rounded-lg p-4 mb-6 border-l-4 border-blue-500">
<div id="event-text" class="text-gray-800 text-lg">
Bem-vindo, ${gameState.playerName}! Você começa com R$50.000. Escolha o tipo de negócio para começar sua jornada empresarial.
</div>
</div>
<!-- Business Selection (Initial Screen) -->
<div id="business-selection" class="">
<h3 class="text-xl font-semibold mb-4 text-gray-700">Escolha seu tipo de negócio:</h3>
<div class="grid grid-cols-1 md:grid-cols-3 gap-6">
<div class="choice-card bg-white border border-gray-200 rounded-lg overflow-hidden shadow-sm cursor-pointer transition-all duration-300" onclick="selectBusiness('comercio')">
<div class="p-5 bg-gradient-to-br from-orange-100 to-orange-50">
<i class="fas fa-store text-orange-500 text-4xl mb-3"></i>
<h4 class="font-bold text-lg text-gray-800 mb-2">Comércio Varejista</h4>
<p class="text-gray-600 text-sm mb-3">Loja física com produtos diversos. Risco moderado, margens variáveis.</p>
<div class="text-xs space-y-1">
<div class="flex justify-between"><span>Investimento Inicial:</span> <span class="font-bold">R$30.000</span></div>
<div class="flex justify-between"><span>Potencial Clientes:</span> <span class="font-bold">Médio</span></div>
<div class="flex justify-between"><span>Competição:</span> <span class="font-bold">Alta</span></div>
</div>
</div>
</div>
<div class="choice-card bg-white border border-gray-200 rounded-lg overflow-hidden shadow-sm cursor-pointer transition-all duration-300" onclick="selectBusiness('cafeteria')">
<div class="p-5 bg-gradient-to-br from-amber-100 to-amber-50">
<i class="fas fa-coffee text-amber-700 text-4xl mb-3"></i>
<h4 class="font-bold text-lg text-gray-800 mb-2">Cafeteria</h4>
<p class="text-gray-600 text-sm mb-3">Ambiente acolhedor para coffee lovers. Alta rotatividade.</p>
<div class="text-xs space-y-1">
<div class="flex justify-between"><span>Investimento Inicial:</span> <span class="font-bold">R$40.000</span></div>
<div class="flex justify-between"><span>Potencial Clientes:</span> <span class="font-bold">Alto</span></div>
<div class="flex justify-between"><span>Competição:</span> <span class="font-bold">Média</span></div>
</div>
</div>
</div>
<div class="choice-card bg-white border border-gray-200 rounded-lg overflow-hidden shadow-sm cursor-pointer transition-all duration-300" onclick="selectBusiness('delivery')">
<div class="p-5 bg-gradient-to-br from-green-100 to-green-50">
<i class="fas fa-motorcycle text-green-600 text-4xl mb-3"></i>
<h4 class="font-bold text-lg text-gray-800 mb-2">Serviço de Delivery</h4>
<p class="text-gray-600 text-sm mb-3">Entrega de produtos locais. Baixa estrutura, alta demanda.</p>
<div class="text-xs space-y-1">
<div class="flex justify-between"><span>Investimento Inicial:</span> <span class="font-bold">R$25.000</span></div>
<div class="flex justify-between"><span>Potencial Clientes:</span> <span class="font-bold">Muito Alto</span></div>
<div class="flex justify-between"><span>Competição:</span> <span class="font-bold">Muito Alta</span></div>
</div>
</div>
</div>
</div>
</div>
<!-- Game Choices (Hidden Initially) -->
<div id="game-choices" class="hidden mt-6">
<h3 class="text-xl font-semibold mb-4 text-gray-700">Decisão do Mês:</h3>
<div class="grid grid-cols-1 md:grid-cols-3 gap-4">
<button id="choice1" onclick="makeChoice(1)" class="bg-blue-100 hover:bg-blue-200 text-blue-800 font-medium py-3 px-4 rounded-lg border border-blue-200 transition-all duration-200 flex items-start">
<span class="bg-blue-500 text-white rounded-full w-6 h-6 flex items-center justify-center mr-3 mt-0.5">1</span>
<span id="choice1-text"></span>
</button>
<button id="choice2" onclick="makeChoice(2)" class="bg-green-100 hover:bg-green-200 text-green-800 font-medium py-3 px-4 rounded-lg border border-green-200 transition-all duration-200 flex items-start">
<span class="bg-green-500 text-white rounded-full w-6 h-6 flex items-center justify-center mr-3 mt-0.5">2</span>
<span id="choice2-text"></span>
</button>
<button id="choice3" onclick="makeChoice(3)" class="bg-red-100 hover:bg-red-200 text-red-800 font-medium py-3 px-4 rounded-lg border border-red-200 transition-all duration-200 flex items-start">
<span class="bg-red-500 text-white rounded-full w-6 h-6 flex items-center justify-center mr-3 mt-0.5">3</span>
<span id="choice3-text"></span>
</button>
</div>
</div>
<!-- Current Stats -->
<div id="current-stats" class="hidden mt-8 bg-gray-50 p-4 rounded-lg border border-gray-200">
<h3 class="text-lg font-medium text-gray-700 mb-3">Resumo Financeiro</h3>
<div class="grid grid-cols-2 md:grid-cols-4 gap-4 text-center">
<div>
<div class="text-sm text-gray-500">Receita Mensal</div>
<div id="monthly-income" class="text-green-600 font-bold">R$0</div>
</div>
<div>
<div class="text-sm text-gray-500">Despesas Mensais</div>
<div id="monthly-expenses" class="text-red-600 font-bold">R$0</div>
</div>
<div>
<div class="text-sm text-gray-500">Lucro Líquido</div>
<div id="net-profit" class="text-blue-600 font-bold">R$0</div>
</div>
<div>
<div class="text-sm text-gray-500">Próximo Nível</div>
<div id="next-level" class="text-purple-600 font-bold">R$0</div>
</div>
</div>
</div>
<!-- Leaderboard -->
<div class="mt-10">
<div class="flex justify-between items-center mb-4">
<h3 class="text-xl font-semibold text-gray-700">Placar de Líderes</h3>
<div class="flex items-center bg-yellow-50 px-3 py-1 rounded-full">
<i class="fas fa-trophy text-yellow-400 mr-1"></i>
<span id="player-score" class="font-bold">0</span>
</div>
</div>
<div class="bg-white rounded-lg shadow overflow-hidden border border-gray-200">
<table class="min-w-full divide-y divide-gray-200">
<thead class="bg-gray-50">
<tr>
<th class="px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Posição</th>
<th class="px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Negócio</th>
<th class="px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Capital</th>
<th class="px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Clientes</th>
<th class="px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Pontos</th>
</tr>
</thead>
<tbody id="leaderboard-body" class="bg-white divide-y divide-gray-200">
<!-- Leaderboard populated by JS -->
</tbody>
</table>
</div>
</div>
</div>
</div>
<!-- Help Button -->
<button onclick="toggleModal('help-modal')" class="fixed bottom-6 right-6 bg-blue-600 text-white w-12 h-12 rounded-full shadow-lg hover:bg-blue-700 transition-all duration-200 flex items-center justify-center">
<i class="fas fa-question text-xl"></i>
</button>
<!-- Name Input Modal (shown first) -->
<div id="name-modal" class="modal fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center p-4 z-50 active">
<div class="bg-white rounded-lg shadow-xl max-w-md w-full">
<div class="p-6 text-center">
<h3 class="text-2xl font-bold text-gray-800 mb-4">Bem-vindo ao Startup Empire!</h3>
<p class="text-gray-600 mb-6">Antes de começar, qual é o nome do seu empreendedor?</p>
<input type="text" id="player-name" placeholder="Seu nome" class="w-full px-4 py-2 border border-gray-300 rounded-lg mb-4 focus:outline-none focus:ring-2 focus:ring-blue-500">
<button onclick="startGame()" class="bg-blue-600 hover:bg-blue-700 text-white font-medium py-2 px-6 rounded-lg transition-colors duration-200">
Começar Jogo
</button>
</div>
</div>
</div>
<!-- Help Modal -->
<div id="help-modal" class="modal fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center p-4 z-50">
<div class="bg-white rounded-lg shadow-xl max-w-md w-full max-h-screen overflow-y-auto">
<div class="p-6">
<div class="flex justify-between items-center mb-4">
<h3 class="text-xl font-bold text-gray-800">Como Jogar</h3>
<button onclick="toggleModal('help-modal')" class="text-gray-400 hover:text-gray-600">
<i class="fas fa-times"></i>
</button>
</div>
<div class="space-y-4 text-gray-600">
<p><strong>Startup Empire</strong> é um simulador de negócios onde você toma decisões estratégicas para crescer sua empresa.</p>
<div class="bg-blue-50 p-3 rounded-lg">
<h4 class="font-bold text-blue-700 mb-2">Passos para Jogar:</h4>
<ol class="list-decimal list-inside space-y-1">
<li>Escolha entre os 3 tipos de negócio</li>
<li>Tome decisões mensais para sua empresa</li>
<li>Gerencie seu capital, clientes e reputação</li>
<li>Suba de nível para desafios mais complexos</li>
<li>Batalhe pelo topo do placar de líderes</li>
</ol>
</div>
<div class="bg-yellow-50 p-3 rounded-lg">
<h4 class="font-bold text-yellow-700 mb-2">Mecânicas do Jogo:</h4>
<ul class="list-disc list-inside space-y-1">
<li><strong>Capital:</strong> Dinheiro disponível para investimentos</li>
<li><strong>Clientes:</strong> Base de clientes afeta sua receita</li>
<li><strong>Reputação:</strong> Impacta na atração de clientes</li>
<li><strong>Níveis:</strong> Completar objetivos avança seu nível</li>
<li><strong>Pontuação:</strong> Baseada em todos seus indicadores</li>
</ul>
</div>
<p class="text-sm italic">Dica: Encontre o equilíbrio entre investimentos agressivos e gestão conservadora para criar um império sustentável!</p>
</div>
</div>
</div>
</div>
<!-- Game Over Modal -->
<div id="game-over-modal" class="modal fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center p-4 z-50">
<div class="bg-white rounded-lg shadow-xl max-w-md w-full">
<div class="p-6 text-center">
<i class="fas fa-skull-crossbones text-red-500 text-5xl mb-4"></i>
<h3 class="text-2xl font-bold text-gray-800 mb-2">Fim de Jogo!</h3>
<p id="game-over-text" class="text-gray-600 mb-6">Você ficou sem capital e sua empresa faliu.</p>
<div class="bg-gray-100 p-4 rounded-lg mb4">
<div class="text-lg font-medium">Sua Pontuação Final:</div>
<div id="final-score" class="text-3xl font-bold text-blue-600 my-2">0</div>
</div>
<button onclick="resetGame()" class="bg-blue-600 hover:bg-blue-700 text-white font-medium py-2 px-6 rounded-lg transition-colors duration-200">
Jogar Novamente
</button>
</div>
</div>
</div>
<!-- Level Up Modal -->
<div id="level-up-modal" class="modal fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center p-4 z-50">
<div class="bg-white rounded-lg shadow-xl max-w-md w-full">
<div class="p-6 text-center">
<div class="bg-gradient-to-r from-yellow-400 to-yellow-500 w-16 h-16 rounded-full flex items-center justify-center mx-auto mb-4">
<i class="fas fa-trophy text-white text-2xl"></i>
</div>
<h3 class="text-2xl font-bold text-gray-800 mb-2">Nível Aumentado!</h3>
<p id="level-up-text" class="text-gray-600 mb-6">Você alcançou o nível 2! Novos desafios aguardam.</p>
<div class="bg-yellow-50 p-4 rounded-lg mb-4 text-left">
<h4 class="font-medium text-yellow-800 mb-2">Bônus do Nível:</h4>
<p id="level-bonus" class="text-sm">+10% nas receitas mensais</p>
</div>
<button onclick="toggleModal('level-up-modal')" class="bg-blue-600 hover:bg-blue-700 text-white font-medium py-2 px-6 rounded-lg transition-colors duration-200">
Continuar
</button>
</div>
</div>
</div>
</div>
<script>
// Game State
const gameState = {
playerName: "Empreendedor",
capital: 50000,
customers: 0,
reputation: 50,
level: 1,
xp: 0,
xpToNextLevel: 100,
businessType: null,
monthlyIncome: 0,
monthlyExpenses: 0,
score: 0,
month: 0,
gameOver: false,
businessData: {
comercio: {
name: "Comércio",
incomeFactor: 2.5,
expenseFactor: 1.8,
customerGrowth: 0.8,
repImpact: 1.2,
initialExpense: 30000,
icon: "fas fa-store"
},
cafeteria: {
name: "Cafeteria",
incomeFactor: 3.0,
expenseFactor: 2.2,
customerGrowth: 1.2,
repImpact: 1.5,
initialExpense: 40000,
icon: "fas fa-coffee"
},
delivery: {
name: "Delivery",
incomeFactor: 3.5,
expenseFactor: 2.5,
customerGrowth: 1.5,
repImpact: 1.3,
initialExpense: 25000,
icon: "fas fa-motorcycle"
}
},
scenarios: [
{
event: "A inflação subiu e seus custos operacionais aumentaram 15%. Como reagir?",
choices: [
{
text: "Repassar todo aumento para os clientes (risco de perder vendas)",
capital: 0,
customers: -15,
reputation: -10
},
{
text: "Absorver parte do custo e repassar apenas 5% (equilíbrio)",
capital: -5000,
customers: -5,
reputation: 5
},
{
text: "Não repassar nada e tentar cortes internos (custa mais agora, mantém clientes)",
capital: -10000,
customers: 10,
reputation: 15
}
]
},
{
event: "Sua região enfrenta um blecaute prolongado. Como manter o negócio?",
choices: [
{
text: "Alugar gerador caro para continuar operando",
capital: -15000,
customers: 10,
reputation: 10
},
{
text: "Operar com capacidade reduzida apenas de dia",
capital: -5000,
customers: -10,
reputation: -5
},
{
text: "Fechar temporariamente até normalização",
capital: 2000,
customers: -20,
reputation: -15
}
]
},
{
event: "Seu principal funcionário pediu aumento. Como lidar?",
choices: [
{
text: "Dar aumento para reter o talento",
capital: -5000,
customers: 0,
reputation: 10
},
{
text: "Oferecer bônus por metas em vez de aumento fixo",
capital: -2000,
customers: 0,
reputation: 5
},
{
text: "Recusar e arriscar perder o funcionário",
capital: 0,
customers: -5,
reputation: -10
}
]
},
{
event: "Surge oportunidade de comprar um concorrente em dificuldades. O que faz?",
choices: [
{
text: "Adquirir mesmo precisando de empréstimo",
capital: 10000,
customers: 40,
reputation: 15,
debt: 50000
},
{
text: "Comprar apenas parte dos ativos mais valiosos",
capital: -30000,
customers: 20,
reputation: 10
},
{
text: "Não comprar e focar no crescimento orgânico",
capital: 0,
customers: 0,
reputation: 0
}
]
},
{
event: "Mudanças na legislação exigem adaptações custosas. Como proceder?",
choices: [
{
text: "Investir imediatamente para estar em compliance",
capital: -25000,
customers: 0,
reputation: 15
},
{
text: "Implementar gradualmente enquanto negocia prazos",
capital: -10000,
customers: 0,
reputation: 5
},
{
text: "Esperar ser notificado para agir",
capital: 0,
customers: -5,
reputation: -15
}
]
},
{
event: "A concorrência está lançando uma promoção agressiva. O que você faz?",
choices: [
{
text: "Igualar os preços da concorrência (Reduz lucro, mas mantém clientes)",
capital: -2000,
customers: 5,
reputation: 3
},
{
text: "Manter preços e focar na qualidade (Menos clientes agora, mas reforça marca)",
capital: -1000,
customers: -10,
reputation: 5
},
{
text: "Sair da disputa de preços e inovar com novo produto (Custo alto, mas atrai atenção)",
capital: -8000,
customers: 15,
reputation: 10
}
]
},
{
event: "Um funcionário cometeu um erro caro. Como proceder?",
choices: [
{
text: "Demitir imediatamente (Mostra seriedade, mas desmotiva equipe)",
capital: -500,
customers: -5,
reputation: -3
},
{
text: "Dar feedback e treinamento (Custo de tempo, mas melhora equipe)",
capital: -2000,
customers: 0,
reputation: 7
},
{
text: "Ignorar desta vez (Arrisca repetição do erro)",
capital: -1000,
customers: 0,
reputation: -5
}
]
},
{
event: "Surgiu oportunidade de expansão. O que decide?",
choices: [
{
text: "Investir agressivamente com empréstimo (Risco alto, alta recompensa)",
capital: 20000,
customers: 30,
reputation: 15,
debt: 30000
},
{
text: "Expandir de forma gradual e sustentável (Crescimento mais lento, mas seguro)",
capital: -12000,
customers: 15,
reputation: 10
},
{
text: "Manter operação atual (Nada muda)",
capital: 0,
customers: 0,
reputation: 0
}
]
},
{
event: "Precisa melhorar sua operação. Qual estratégia adota?",
choices: [
{
text: "Investir em tecnologia e automação (Alto custo inicial, economia a longo prazo)",
capital: -15000,
customers: 10,
reputation: 8
},
{
text: "Contratar mais pessoal (Custo recorrente, mas melhora serviço)",
capital: -5000,
customers: 5,
reputation: 5
},
{
text: "Terceirizar parte do serviço (Reduz controle, mas corta custos)",
capital: -3000,
customers: 0,
reputation: -2
}
]
},
{
event: "Recebeu crítica negativa nas redes sociais. Como responde?",
choices: [
{
text: "Oferecer desconto e resolver o problema (Custo direto, mas mostra compromisso)",
capital: -3000,
customers: 2,
reputation: 10
},
{
text: "Responder educadamente pedindo feedback (Gestão de crise profissional)",
capital: 0,
customers: 0,
reputation: 5
},
{
text: "Ignorar ou responder na defensiva (Piora imagem pública)",
capital: 0,
customers: -10,
reputation: -10
}
]
},
{
event: "Estamos em uma crise econômica e as vendas caíram. Qual ação tomar?",
choices: [
{
text: "Reduzir custos drasticamente (incluindo demissões) para sobreviver",
capital: 5000,
customers: -15,
reputation: -20
},
{
text: "Focar em produtos/serviços essenciais com melhor custo-benefício",
capital: -3000,
customers: 5,
reputation: 10
},
{
text: "Manter tudo como está e torcer pela melhora da economia",
capital: -10000,
customers: -10,
reputation: -5
}
]
},
{
event: "Seu fornecedor principal aumentou os preços em 30%. Como reagir?",
choices: [
{
text: "Repassar o aumento para os clientes (arrisca perder parte deles)",
capital: 0,
customers: -20,
reputation: -5
},
{
text: "Negociar prazos mais longos ou buscar outro fornecedor",
capital: -5000,
customers: 0,
reputation: 5
},
{
text: "Comprar grande estoque agora antes de novos aumentos",
capital: -20000,
customers: 0,
reputation: 3
}
]
},
{
event: "Seu sistema teve uma falha grave que comprometeu dados de clientes. O que fazer?",
choices: [
{
text: "Notificar imediatamente os clientes e oferecer compensação",
capital: -10000,
customers: -5,
reputation: 15
},
{
text: "Resolver o problema internamente sem alarde",
capital: -5000,
customers: 0,
reputation: -10
},
{
text: "Culpar um terceiro e minimizar a responsabilidade",
capital: -2000,
customers: -15,
reputation: -20
}
]
},
{
event: "Um investidor oferece capital significativo por uma participação maior na empresa. O que decide?",
choices: [
{
text: "Aceitar o investimento para expandir rapidamente",
capital: 50000,
customers: 40,
reputation: 5,
debt: 0
},
{
text: "Negociar termos mais favoráveis mantendo controle",
capital: 30000,
customers: 20,
reputation: 10
},
{
text: "Recusar para manter independência total",
capital: 0,
customers: 0,
reputation: 0
}
]
},
{
event: "Seu estoque está ficando obsoleto. Como lidar com essa situação?",
choices: [
{
text: "Fazer liquidação para escoar o estoque rapidamente",
capital: -3000,
customers: 15,
reputation: -5
},
{
text: "Investir em marketing para dar nova vida aos produtos",
capital: -8000,
customers: 5,
reputation: 10
},
{
text: "Doar parte do estoque para ganho de imagem",
capital: -5000,
customers: 10,
reputation: 15
}
]
},
{
event: "Um cliente importante está exigindo condições especiais. Como proceder?",
choices: [
{
text: "Ceder às exigências para manter o cliente",
capital: -5000,
customers: 1,
reputation: 0
},
{
text: "Oferecer contrapartidas equilibradas",
capital: -2000,
customers: 0,
reputation: 5
},
{
text: "Manter política standard mesmo arriscando perder o cliente",
capital: 0,
customers: -1,
reputation: 10
}
]
},
{
event: "Seu sócio quer sair do negócio e vender sua parte. O que decide?",
choices: [
{
text: "Comprar a parte dele mesmo que precise de empréstimo",
capital: -40000,
customers: 0,
reputation: 5,
debt: 40000
},
{
text: "Buscar um novo sócio para assumir a parte dele",
capital: 0,
customers: 0,
reputation: 0
},
{
text: "Negociar venda parcial e transformação da sociedade",
capital: -20000,
customers: 0,
reputation: 3
}
]
},
{
event: "Uma nova tecnologia pode revolucionar seu setor. Qual estratégia adotar?",
choices: [
{
text: "Investir pesado para ser pioneiro (alto risco/alta recompensa)",
capital: -40000,
customers: 30,
reputation: 20
},
{
text: "Adotar gradualmente após validação no mercado",
capital: -15000,
customers: 10,
reputation: 10
},
{
text: "Ignorar e manter modelo atual",
capital: 0,
customers: -10,
reputation: -10
}
]
},
{
event: "Seu negócio está crescendo acima do esperado. Como escalar?",
choices: [
{
text: "Contratar gerente para delegar operações",
capital: -20000,
customers: 15,
reputation: 15
},
{
text: "Investir em automação para aumentar produtividade",
capital: -30000,
customers: 10,
reputation: 10
},
{
text: "Mantir controle total mesmo com sobrecarga",
capital: -5000,
customers: -5,
reputation: -5
}
]
},
{
event: "Seu marketing não está trazendo resultados. Como ajustar?",
choices: [
{
text: "Contratar agência profissional (custo alto, resultados garantidos)",
capital: -20000,
customers: 25,
reputation: 10
},
{
text: "Investir em redes sociais com equipe interna",
capital: -8000,
customers: 15,
reputation: 8
},
{
text: "Cortar gastos com marketing e confiar no boca a boca",
capital: 5000,
customers: -10,
reputation: -5
}
]
}
],
leaderboard: [
{ business: "Empresa Fantasma", capital: 250000, customers: 1200, score: 8450 },
{ business: "Negócio Modelo", capital: 180000, customers: 950, score: 6850 },
{ business: "Startup Inovadora", capital: 120000, customers: 700, score: 5200 },
{ business: "Você", capital: 50000, customers: 0, score: 0 }
]
};
// DOM Elements
const elements = {
capital: document.getElementById('capital'),
customers: document.getElementById('customers'),
reputation: document.getElementById('reputation'),
businessType: document.getElementById('business-type'),
eventText: document.getElementById('event-text'),
businessSelection: document.getElementById('business-selection'),
gameChoices: document.getElementById('game-choices'),
choice1: document.getElementById('choice1'),
choice2: document.getElementById('choice2'),
choice3: document.getElementById('choice3'),
choice1Text: document.getElementById('choice1-text'),
choice2Text: document.getElementById('choice2-text'),
choice3Text: document.getElementById('choice3-text'),
monthlyIncome: document.getElementById('monthly-income'),
monthlyExpenses: document.getElementById('monthly-expenses'),
netProfit: document.getElementById('net-profit'),
nextLevel: document.getElementById('next-level'),
playerScore: document.getElementById('player-score'),
leaderboardBody: document.getElementById('leaderboard-body'),
currentStats: document.getElementById('current-stats'),
moneyBar: document.getElementById('money-bar'),
customerBar: document.getElementById('customer-bar'),
reputationBar: document.getElementById('reputation-bar'),
levelProgress: document.getElementById('level-progress'),
level: document.getElementById('level'),
finalScore: document.getElementById('final-score'),
gameOverText: document.getElementById('game-over-text'),
levelUpText: document.getElementById('level-up-text'),
levelBonus: document.getElementById('level-bonus')
};
// Game Functions
function formatMoney(amount) {
return amount.toFixed(2).replace('.', ',').replace(/(\d)(?=(\d{3})+(?!\d))/g, '$1.');
}
function updateUI() {
// Update main stats
elements.capital.textContent = formatMoney(gameState.capital);
elements.customers.textContent = gameState.customers;
elements.reputation.textContent = gameState.reputation;
// Update bars
const moneyPercent = Math.min(100, (gameState.capital / 200000) * 100);
elements.moneyBar.style.width = `${moneyPercent}%`;
const customerPercent = Math.min(100, (gameState.customers / 500) * 100);
elements.customerBar.style.width = `${customerPercent}%`;
elements.reputationBar.style.width = `${gameState.reputation}%`;
// Update business stats if selected
if (gameState.businessType) {
updateBusinessStats();
}
// Update leaderboard
updateLeaderboard();
// Check for game over
if (gameState.capital <= 0 && !gameState.gameOver) {
gameOver();
}
}
function updateBusinessStats() {
const business = gameState.businessData[gameState.businessType];
// Calculate business metrics
gameState.monthlyIncome = Math.round(business.incomeFactor * gameState.customers * (1 + gameState.reputation / 200) * (1 + (gameState.level-1)*0.1));
gameState.monthlyExpenses = Math.round(business.expenseFactor * 100 * (1 + (gameState.level-1)*0.15));
const netProfit = gameState.monthlyIncome - gameState.monthlyExpenses;
// Update UI
elements.monthlyIncome.textContent = formatMoney(gameState.monthlyIncome);
elements.monthlyExpenses.textContent = formatMoney(gameState.monthlyExpenses);
elements.netProfit.textContent = formatMoney(netProfit);
// Update xp and level
const xpGain = Math.max(0, netProfit / 20) + Math.round(gameState.customers / 10);
gameState.xp += xpGain;
elements.levelProgress.style.width = `${Math.min(100, (gameState.xp / gameState.xpToNextLevel) * 100)}%`;
elements.nextLevel.textContent = formatMoney(gameState.xpToNextLevel - gameState.xp);
// Check for level up
if (gameState.xp >= gameState.xpToNextLevel) {
levelUp();
}
// Update score
gameState.score = Math.round(
gameState.capital * 0.1 +
gameState.customers * 5 +
gameState.reputation * 10 +
(gameState.level - 1) * 1000
);
elements.playerScore.textContent = gameState.score;
}
function updateLeaderboard() {
// Update player position
const playerIndex = gameState.leaderboard.findIndex(item => item.business === "Você");
if (playerIndex !== -1) {
gameState.leaderboard[playerIndex] = {
business: `${gameState.playerName} (${gameState.businessData[gameState.businessType]?.name || "..."})`,
capital: Math.round(gameState.capital),
customers: gameState.customers,
score: gameState.score
};
}
// Sort leaderboard
gameState.leaderboard.sort((a, b) => b.score - a.score);
// Update UI
elements.leaderboardBody.innerHTML = '';
gameState.leaderboard.forEach((item, index) => {
const row = document.createElement('tr');
row.className = index % 2 === 0 ? 'bg-white' : 'bg-gray-50';
row.innerHTML = `
<td class="px-4 py-3 whitespace-nowrap">
${index + 1}
${index === 0 ? ' <i class="fas fa-crown text-yellow-400"></i>' : ''}
</td>
<td class="px-4 py-3 whitespace-nowrap">${item.business}</td>
<td class="px-4 py-3 whitespace-nowrap">R$${formatMoney(item.capital)}</td>
<td class="px-4 py-3 whitespace-nowrap">${item.customers}</td>
<td class="px-4 py-3 whitespace-nowrap font-bold">${item.score}</td>
`;
elements.leaderboardBody.appendChild(row);
});
}
function selectBusiness(type) {
// Set business type
gameState.businessType = type;
// Deduct initial investment
gameState.capital -= gameState.businessData[type].initialExpense;
// Update UI
const business = gameState.businessData[type];
elements.businessType.innerHTML = `<i class="${business.icon} mr-1"></i> ${business.name}`;
elements.businessSelection.classList.add('hidden');
elements.gameChoices.classList.remove('hidden');
elements.currentStats.classList.remove('hidden');
// Show first event
gameState.customers = 20; // Starting customers
showRandomEvent();
// Update UI
updateUI();
}
function showRandomEvent() {
gameState.month++;
// Random event or monthly report
if (Math.random() < 0.85 || gameState.month === 1) {
const scenario = gameState.scenarios[Math.floor(Math.random() * gameState.scenarios.length)];
elements.eventText.textContent = scenario.event;
// Set choices
elements.choice1Text.textContent = scenario.choices[0].text;
elements.choice2Text.textContent = scenario.choices[1].text;
elements.choice3Text.textContent = scenario.choices[2].text;
} else {
// Monthly report
const business = gameState.businessData[gameState.businessType];
const income = gameState.monthlyIncome;
const expenses = gameState.monthlyExpenses;
const profit = income - expenses;
// Apply monthly changes
gameState.capital += profit;
// Natural customer growth based on reputation
const newCustomers = Math.round(
business.customerGrowth * 5 * (1 + gameState.reputation / 100) * (Math.random() * 0.5 + 0.75)
);
gameState.customers += newCustomers;
// Small reputation fluctuation
const repChange = Math.round((Math.random() * 4 - 2) * (1 + gameState.level / 10));
gameState.reputation = Math.max(0, Math.min(100, gameState.reputation + repChange));
// Show report
elements.eventText.innerHTML = `
<div class="font-bold text-lg mb-2">Relatório Mensal - Mês ${gameState.month}</div>
<div class="grid grid-cols-2 gap-2 text-sm">
<div>Receita Total: <span class="float-right font-medium text-green-600">+R$${formatMoney(income)}</span></div>
<div>Despesas: <span class="float-right font-medium text-red-600">-R$${formatMoney(expenses)}</span></div>
<div class="col-span-2 border-t border-gray-200 my-1 pt-1">
Resultado Líquido: <span class="float-right font-bold ${profit >= 0 ? 'text-green-600' : 'text-red-600'}">${profit >= 0 ? '+' : ''}R$${formatMoney(profit)}</span>
</div>
<div>Novos Clientes: <span class="float-right font-medium text-blue-600">+${newCustomers}</span></div>
<div>Reputação: <span class="float-right font-medium ${repChange >= 0 ? 'text-green-600' : 'text-red-600'}">${repChange >= 0 ? '+' : ''}${repChange}</span></div>
</div>
<div class="mt-3 text-center">
<button onclick="showRandomEvent()" class="bg-blue-600 hover:bg-blue-700 text-white text-sm font-medium py-1 px-3 rounded">
Continuar para Próximo Mês
</button>
</div>
`;
elements.gameChoices.classList.add('hidden');
}
// Update UI
updateUI();
}
function makeChoice(choiceNumber) {
if (gameState.gameOver) return;
const scenario = gameState.scenarios.find(sc => sc.event === elements.eventText.textContent);
if (!scenario) return;
const choice = scenario.choices[choiceNumber - 1];
// Apply choice effects
gameState.capital += choice.capital || 0;
gameState.customers += choice.customers || 0;
gameState.reputation = Math.max(0, Math.min(100, gameState.reputation + (choice.reputation || 0)));
// Debt for risky choices
if (choice.debt) {
gameState.capital += choice.debt;
elements.eventText.innerHTML += `
<div class="mt-3 p-2 bg-red-50 border border-red-200 rounded text-sm">
<i class="fas fa-exclamation-triangle text-red-500 mr-1"></i>
Você contraiu uma dívida de R$${formatMoney(choice.debt)} que deverá ser paga em 3 meses!
</div>
`;
setTimeout(() => {
gameState.capital -= choice.debt * 1.1; // Pay debt with 10% interest
updateUI();
if (gameState.capital <= 0) gameOver();
}, 3000);
}
// Update UI
updateUI();
// Show next event after short delay
setTimeout(showRandomEvent, 1500);
}
function levelUp() {
gameState.level++;
gameState.xp -= gameState.xpToNextLevel;
gameState.xpToNextLevel = Math.round(gameState.xpToNextLevel * 1.5);
// Update UI
elements.level.textContent = gameState.level;
// Show level up modal
elements.levelUpText.textContent = `Você alcançou o nível ${gameState.level}! Novos desafios aguardam.`;
elements.levelBonus.textContent = [
"+10% nas receitas mensais",
"Aumento de 15% nas despesas operacionais",
"Novos desafios estratégicos",
"Crescimento mais rápido de clientes"
][Math.floor(Math.random() * 4)];
toggleModal('level-up-modal');
// Play level up sound if available
const audio = new Audio('https://assets.mixkit.co/active_storage/sfx/2577/2577-preview.mp3');
audio.volume = 0.3;
audio.play().catch(e => console.log("Audio play failed:", e));
}
function gameOver() {
gameState.gameOver = true;
elements.finalScore.textContent = gameState.score;
let message = "";
if (gameState.capital <= 0) {
message = "Você ficou sem capital e sua empresa faliu. A gestão financeira é crucial para qualquer negócio!";
} else if (gameState.reputation <= 0) {
message = "Sua reputação chegou a zero e os clientes abandonaram seu negócio. Lembre-se: reputação é tudo no mundo dos negócios!";
} else {
message = "Seu negócio teve que fechar as portas. Reflita sobre suas decisões e tente novamente!";
}
elements.gameOverText.textContent = message;
toggleModal('game-over-modal');
}
function startGame() {
const nameInput = document.getElementById('player-name');
if (nameInput.value.trim()) {
gameState.playerName = nameInput.value.trim();
}
toggleModal('name-modal', false);
// Typewriter effect for initial text
elements.eventText.classList.add('typewriter');
setTimeout(() => {
elements.eventText.classList.remove('typewriter');
}, 3500);
}
function resetGame() {
// Reset game state
gameState.capital = 50000;
gameState.customers = 0;
gameState.reputation = 50;
gameState.level = 1;
gameState.xp = 0;
gameState.xpToNextLevel = 100;
gameState.businessType = null;
gameState.monthlyIncome = 0;
gameState.monthlyExpenses = 0;
gameState.score = 0;
gameState.month = 0;
gameState.gameOver = false;
// Reset UI
elements.businessType.textContent = "Ainda não definido";
elements.businessSelection.classList.remove('hidden');
elements.gameChoices.classList.add('hidden');
elements.currentStats.classList.add('hidden');
elements.eventText.textContent = "Bem-vindo ao Startup Empire! Você começa com R$50.000. Escolha o tipo de negócio para começar sua jornada empresarial.";
elements.level.textContent = "1";
elements.levelProgress.style.width = "0%";
// Update UI
updateUI();
// Close modals
toggleModal('game-over-modal', false);
toggleModal('help-modal', false);
}
function toggleModal(modalId, show = null) {
const modal = document.getElementById(modalId);
if (show === true || (show === null && !modal.classList.contains('active'))) {
modal.classList.add('active');
} else {
modal.classList.remove('active');
}
}
// Initialize game
updateUI();
// Typewriter effect for initial text
elements.eventText.classList.add('typewriter');
setTimeout(() => {
elements.eventText.classList.remove('typewriter');
}, 3500);
</script>
<p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://enzostvs-deepsite.hf.space?remix=Fixo22/criando-uma-startup" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
</html> |