AIM NHẸ 70%

You might also like

Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 2

using System;

// Define the Player class


public class Player
{
private float x; // Player's x-coordinate
private float y; // Player's y-coordinate

// Constructor
public Player(float x, float y)
{
this.x = x;
this.y = y;
}

// Method to get player's position


public Tuple<float, float> GetPosition()
{
return Tuple.Create(x, y);
}
}

// Define the Enemy class


public class Enemy
{
private float x; // Enemy's x-coordinate
private float y; // Enemy's y-coordinate

// Constructor
public Enemy(float x, float y)
{
this.x = x;
this.y = y;
}

// Method to get enemy's position


public Tuple<float, float> GetPosition()
{
return Tuple.Create(x, y);
}
}

// Define the Aimbot class


public class Aimbot
{
private float strength; // Strength of the aimbot (0 to 1)

// Constructor
public Aimbot(float strength)
{
this.strength = strength;
}

// Method to aim at the enemy with a given strength


public void AimAtEnemy(Player player, Enemy enemy)
{
// Get player's and enemy's positions
var (playerX, playerY) = player.GetPosition();
var (enemyX, enemyY) = enemy.GetPosition();
// Calculate the angle between player and enemy
float angle = (float)Math.Atan2(enemyY - playerY, enemyX - playerX);

// Adjust the aim with the strength


float adjustedAngle = angle + strength * (new Random().Next(101)) / 100.0f;

// Output the aimed angle


Console.WriteLine("Aim adjusted to angle: " + adjustedAngle);
}
}

public class Program


{
public static void Main(string[] args)
{
// Create a player and an enemy
Player player = new Player(10.0f, 20.0f);
Enemy enemy = new Enemy(30.0f, 15.0f);

// Create an aimbot with 70% strength


Aimbot aimbot = new Aimbot(0.7f);

// Aim at the enemy with the aimbot


aimbot.AimAtEnemy(player, enemy);
}
}

You might also like