This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import win32gui | |
import win32process | |
import win32api | |
import win32con | |
import ctypes | |
from ctypes import wintypes | |
# Constants | |
WC_LISTVIEW = "SysListView32" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <windows.h> | |
LRESULT CALLBACK WindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) { | |
switch (uMsg) { | |
case WM_CLOSE: | |
// Ignore the close message | |
return 0; | |
case WM_DESTROY: | |
// Ignore the destroy message | |
return 0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <windows.h> | |
#include <tlhelp32.h> | |
#include <commctrl.h> | |
#include <tchar.h> | |
#pragma comment(lib, "comctl32.lib") | |
BOOL CALLBACK EnumChildProc(HWND hwnd, LPARAM lParam) { | |
char className[256]; | |
GetClassNameA(hwnd, className, sizeof(className)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Player { | |
constructor(name, level = 1, currentXP = 0, totalXP = 0, xpForNextLevel = 100, xpGrowthRate = 1.5) { | |
this.name = name; | |
this.level = level; | |
this.currentXP = currentXP; | |
this.totalXP = totalXP; | |
this.xpForNextLevel = xpForNextLevel; | |
this.xpGrowthRate = xpGrowthRate; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Player { | |
constructor(level = 1, currentXP = 0, totalXP = 0, xpForNextLevel = 100, xpGrowthRate = 1.5) { | |
this.level = level; | |
this.currentXP = currentXP; | |
this.totalXP = totalXP; | |
this.xpForNextLevel = xpForNextLevel; | |
this.xpGrowthRate = xpGrowthRate; | |
} | |
addXP(amount) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Define the Player class | |
Player = {} | |
Player.__index = Player | |
-- Constructor | |
function Player:new(level, currentXP, totalXP, xpForNextLevel, xpGrowthRate) | |
local obj = { | |
level = level or 1, | |
currentXP = currentXP or 0, | |
totalXP = totalXP or 0, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Define the Player table | |
P = { | |
l = 1, -- level | |
c = 0, -- currentXP | |
t = 0, -- totalXP | |
n = 100, -- XP for next level | |
g = 1.5 -- XP growth rate | |
} | |
-- Function to add XP to the player |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Define the Player table | |
Player = { | |
level = 1, | |
currentXP = 0, | |
totalXP = 0, | |
xpForNextLevel = 100, -- Initial XP required for level 2 | |
xpGrowthRate = 1.5 -- How much more XP is needed for each subsequent level | |
} | |
-- Function to add XP to the player |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Define the Player table | |
Player = { | |
level = 1, | |
currentXP = 0, | |
totalXP = 0, | |
xpForNextLevel = 100, -- Initial XP required for level 2 | |
xpGrowthRate = 1.5 -- How much more XP is needed for each subsequent level | |
} | |
-- Function to add XP to the player |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>Battleship</title> | |
<link rel="stylesheet" href="styles.css"> | |
<style> | |
body { | |
display: flex; |
NewerOlder