How do I swap out the mesh on a humanoid armature in Unity 3D?

In Unity 3D, utilizing the Starter Assets package, I am trying to swap the mesh on the Starter Asset character that I duplicated in the scene. I unpacked a prefab so that I could utilize the mesh filter of the new prefab that I imported. I realized that there are several meshes on the (prefab/game object) that I unpacked and wanted to know how to layer them onto the skinned mesh renderer of the starter asset character? The new prefab contains multiple mesh overlays,(i believe the original is in underpants as Man_Body Mesh) and are they layered individually onto the game object?

I have attempted to add a mesh filter (Man_BodyMesh) and used the root which was different on the Man-BodyMesh from the Starter Asset Mesh.basically my object upon play looked like the vertices were jumbled resulting in The Thing from John Carpenter? Iknow the Armature on the Unity Asset has a skeleton, weighted and has a root. I was hoping to copy and paste until I was proven wrong.

Seeking Help for Creating a Circle Generator Tool

Hello, fellow coders,

I'm relatively new to coding and web development but excited to embark on a project combining my passion and my budding programming skills. I'm eager to create a tool like this https://minecraftcirclegenerate.com/ created using HTML, CSS, and JavaScript.

As a beginner, I'm seeking guidance on where to start and how to approach this project effectively. What essential steps must I take to bring this idea to life? Are there any tutorials, online resources, or beginner-friendly libraries you recommend to someone like me?

Additionally, I'm keen to learn about best practices for designing and implementing user-friendly features in the tool. How can I ensure that the interface is intuitive and easy for visitors to my website?

Any advice, tips, or insights you can provide would be immensely valuable as I embark on this coding journey. I'm grateful for any assistance you can offer to help me turn my vision into reality.

Thank you for your time and support.

Best regards

how i can read an image on memory?

how can i read a file to StdPicture?
and draw it on memory HDC?

Public Sub LoadImage(strPath As String)
    Dim myPic As New StdPicture
    Set myPic = LoadPicture(strPath)

    NewImage myPic.Width, myPic.Height
    BitBlt MemoryHDC, 0, 0, Width, Height, myPic.Handle, 0, 0, SRCCOPY 'i get only a black background color
End Sub

Python Hangman Game Program Error

Hello this is Gulshan Negi
Well, I am writing a program for making hangman game in python but it shows some error at the time of its execution. Here is my source code:

import random
def select_word():
    words_in_computer_memory = ['magazine','stars','computer','python','organisation']
    word = random.choice(words_in_computer_memory)
    return word
def is_gussed(word, guessed_letter_list):
    count=0
    for letters in word:
        if letters in guessed_letter_list:
            count+=1:
    if count==len(word):
        return True
    else:
        return False
def guessed_word(word, guessed_letter_list): 
    string=""
    for key in word:
        if key in guessed_letter_list:
            string+=key
        else:
            string+="_ "
    return string
def available_letters(guessed_letter_list):

    string=""
    count=0
    s='abcdefghijklmnopqrstuvwxyz'
    for letter in s:
        if letter in guessed_letter_list:
            count+=1
        else:
            string+=letter
    return string
def hangman_game(word):  
    length=len(word)
    print('''------------------WELCOME TO HANGMAN GAME---------------------------
                                    O   
                                   /|\  
                                   / \  
        ''')
    print("The word you have to guess is of ",length, "letters long.")
    chances=2*len(word)
    i=0
    guessed_letter_list=[]
    while (chances!=0):     

        if word!=guessed_word(word, guessed_letter_list):
            print("You Got", chances, "Chances.")
            print("Letters you can enter should be from these ",available_letters(guessed_letter_list))
            guess=input("ENTER A LETTER ")
            print('\n'*50)

            guessInLowerCase = guess[0].lower()      
            if guessInLowerCase  in guessed_letter_list:
                print("SORRY! YOU HAVE GUSSED THIS LETTER ALREADY! ",guessed_word(word, guessed_letter_list))
            elif guessInLowerCase not in word: 
                print(" SORRY! THE LETTER IS NOT IN WORD",guessed_word(word, guessed_letter_list))
                chances-=1
            else:
                guessed_letter_list.append(guessInLowerCase)
                print("NICE YOU GUSESSED THE RIGHT LETTER! ",guessed_word(word, guessed_letter_list))

        elif word==guessed_word(word, guessed_letter_list):
            print("YOU WON!")
            break

    else:
        print('''
        ********************************************
   YOU LOSS!!
                                 O 
                                /|\  
                                / \  
     ******************************************''')
        print('The word was',word,)

word = select_word()
hangman_game(word)

Can anyone give their suggestions on this?
Thanks

how use CreateDIBSection() with a pointer?

with CreateDIBSection() we create an array of DIB's pixels .. but it's a copy and not a pointer :(
when i change 1 pixel or draw a rectangle, i must re-create the DIB's and then draw the result.

Private bmpPtr() As Long
ReDim bmpPtr(ImageWidth * ImageHeight - 1)
  hBitmap = CreateDIBSection(hdc, bmpInfoHeader, BI_RGB, ByVal bmpPtr, 0, 0)

but when i do:

bmpPtr(PosY * Width + PosX) = color

the value is changed on 'bmpPtr' but not on Bitmap or HDC :(

on VB6 how we create a memory DC?

on VB6 i have these code for create a memory DC:

Public Sub CreateMemoryBitmap(ByVal Width As Long, ByVal _
    Height As Long)

    If (ImageWidth > 0 Or ImageHeight > 0) Then DeleteMemoryBitmap
    ImageWidth = Width
    ImageHeight = Height
    ' Create the device context.

    hdc = CreateCompatibleDC(ByVal 0&)
    If (hdc = 0) Then Debug.Print "no HDC"

    ' Create the bitmap.
    HBitmap = CreateCompatibleBitmap(hdc, ImageWidth, _
        ImageHeight)
    If (HBitmap = 0) Then Debug.Print "no HBITMAP"
    ' Make the device context use the bitmap.
    OldHDC = SelectObject(hdc, HBitmap)
    DrawLine 0, 0, 100, 100, vbBlack

End Sub

i test if the hdc is created, but no error.. but i get bad results.. i belive the DC\HBitmap are created incorrectly :(

how win more speed with DDA?

i can create a DDA algoritm.. but pixel a pixel.
so what is the best speed for it?

IncrementPixel = 2
    For RayAngle = StartAngle To EndAngle Step IncrementAngle
        Distance = 0
        Wall = 0
        RayActualX = RayX
        RayActualY = RayY
        IncrementStepSin = Sin(RayAngle) * IncrementPixel
        IncrementStepCos = Cos(RayAngle) * IncrementPixel
        Do While (Wall = 0)
            Wall = LevelMap(Floor(RayActualY / MapResolution))(Floor(RayActualX / MapResolution))
            If Wall <> 0 Then Exit Do
            RayActualX = RayActualX + IncrementStepCos
            RayActualY = RayActualY + IncrementStepSin
            Distance = Distance + IncrementPixel
        Loop

        ' Cast a ray from the player's position at this angle
        ' Check for collision with any walls
        ' Calculate the distance to the collision point
        ' Draw the wall section on the screen using the distance for perspective
        DrawLine CLng(RayX), CLng(RayY), CLng(RayActualX), CLng(RayActualY), vbCyan
        'Me.Line (CLng(RayX), CLng(RayY))-(CLng(RayActualX), CLng(RayActualY)), vbCyan
    Next RayAngle

these code ins't 100% completed, but what i need is just understand how can i speed up my calculations and win more speed.

VB6 : is possible convert radians to pixels?

VB6 : is possible convert radians to pixels?
the WindowViewe is 200 pixels.
so i need draw 200 lines between PlayerAngle(100 pixels) to 200. but how can i convert pixels to Radians... the PlayerAngle is the 100 pixel(the half of WindowViewe)

Private Sub rayCasting()
    Dim rayAngle As Double
    Dim IncreRayAngle As Double
    Dim RayX As Double
    Dim RayY As Double
    Dim rayCos As Double
    Dim raySin As Double

    'CamWidth is the viewe width... 
    IncreRayAngle = DegreeToRadians(PlayerFOV) / CamWidth 'getting the angle step

    'getting the player position to ray origin:
    RayX = PlayerX * MapResolution 
    RayY = PlayerY * MapResolution

    For rayAngle = PlayerAngle To 2 Step IncreRayAngle
        'draw the line with 50 of lenght thinking on it's angle:
        DrawLine Floor(RayX), Floor(RayY), Floor(RayX + Cos(rayAngle) * 50), Floor(RayY + Sin(rayAngle) * 50), vbRed
    Next rayAngle
End Sub

Visual basic 6: how using RayCasting?

i did these code for create RayCasting:

Option Explicit

Private Declare Sub Sleep Lib "kernel32.dll" (ByVal dwMilliseconds As Long)

Private Const PI As Double = 3.14159265358979

Dim LevelMap(12) As Variant
Dim CamWidth As Long
Dim CamHeight As Long
Dim CamHalfHeight As Long
Dim RayCastingPrecision As Long
Dim PlayerX As Double
Dim PlayerY As Double
Dim PlayerAngle As Long
Dim PlayerFOV As Long
Dim PlayerMovement As Double
Dim PlayerRotation As Double

Dim blnGameLoop As Boolean
Dim colors(3) As ColorConstants

Public Function Floor(ByVal x As Double) As Long
    Floor = (-Int(x) * (-1))
End Function

Private Function DegreeToRadians(degree As Long) As Double
    DegreeToRadians = degree * PI / 180
End Function

Private Sub DrawLine(X0 As Long, Y0 As Long, X1 As Long, Y1 As Long, Color As ColorConstants)
    Me.Line (X0, Y0)-(X1, Y1), Color
End Sub

Private Sub rayCasting()
    ' O RayAngle  o angulo atual do "raio".
    ' se ele comea olhando para angulo 90 e tem fov 60, ento o rayAngle vai de 60 at 120, sendo incrementado por fov/width
    Dim rayAngle As Long
    rayAngle = PlayerAngle - PlayerFOV / 2
    ' Para Cada coluna da tela
    Dim raycount As Long
    For raycount = 0 To CamWidth
        ' Player dados
        Dim RayX As Double
        Dim RayY As Double
        RayX = PlayerX
        RayY = PlayerY


        ' Com cosseno e seno do angulo conseguimos a direo do raio sobre o grid a partir do ponto de viso.
        ' Aqui teremos a direo do raio sobre a matriz e tambm o modulo (passo)
        Dim rayCos As Double
        Dim raySin As Double
        rayCos = Cos(DegreeToRadians(rayAngle)) / RayCastingPrecision
        raySin = Sin(DegreeToRadians(rayAngle)) / RayCastingPrecision

        ' Coliso do raio com as paredes
        Dim Wall As Long
        Wall = 0
        While (Wall = 0) ' Aqui o "raio" seria tipo uma progetil que sai do personagem at colidir com uma parede

            RayX = RayX + rayCos ' novo x do raio
            RayY = RayY + raySin ' novo y do raio
            Wall = LevelMap(Floor(RayY))(Floor(RayX)) ' verifica coliso com a parede (no nulo na matriz)
        Wend

        ' Distancia at a parede (teorema de pitagoras), uma vez que temos o (X,Y) do personagem e da parede
        Dim distance As Double
        distance = Sqr((PlayerX - RayX) ^ 2 + (PlayerY - RayY) ^ 2)

        ' Correo olho de peixe (sem coliso com a parede), melhora a vista em corredores ou proximo de paredes
        distance = distance * Cos(DegreeToRadians(rayAngle - PlayerAngle))

        'Altura da parede em consequncia a distancia
        'quando mais longe a parede est menor ela  e vice versa, so inversamente proporcionais
        Dim WallHeight As Long
        WallHeight = Floor(CamHalfHeight / distance)
        If (WallHeight > CamHalfHeight) Then WallHeight = CamHalfHeight


         'Desenhando as paredes usando os tamanhos calculados acima
        DrawLine raycount, 0, raycount, CamHalfHeight - WallHeight, ColorConstants.vbCyan 'cu
        If (Wall > 0) Then
            DrawLine raycount, CamHalfHeight - WallHeight, raycount, CamHalfHeight + WallHeight, colors(Wall) ' Parede
        End If
        DrawLine raycount, CamHalfHeight + WallHeight, raycount, CamHeight, vbMagenta ' cho
        Wall = 0
        ' Incremento da ray
        rayAngle = rayAngle + PlayerFOV / CamWidth
    Next raycount
End Sub

Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
    Dim playerCos As Double
    Dim playerSin As Double
    Dim newX As Double
    Dim newY As Double
    If (KeyCode = vbKeyEscape) Then
        blnGameLoop = False
        End
    ElseIf (KeyCode = vbKeyUp) Then

        playerCos = Cos(DegreeToRadians(PlayerAngle)) * PlayerMovement
        playerSin = Sin(DegreeToRadians(PlayerAngle)) * PlayerMovement
        newX = PlayerX + playerCos
        newY = PlayerY + playerSin

        ' Verficia coliso do player
        If (LevelMap(Floor(newY))(Floor(newX)) = 0) Then
            PlayerX = newX
            PlayerY = newY
        End If
    ElseIf (KeyCode = vbKeyDown) Then


        playerCos = Cos(DegreeToRadians(PlayerAngle)) * PlayerMovement
        playerSin = Sin(DegreeToRadians(PlayerAngle)) * PlayerMovement
        newX = PlayerX - playerCos
        newY = PlayerY - playerSin

        ' Verficia coliso do player
        If (LevelMap(Floor(newY))(Floor(newX)) = 0) Then
            PlayerX = newX
            PlayerY = newY
        End If
    ElseIf (KeyCode = vbKeyLeft) Then
        PlayerAngle = PlayerAngle - PlayerRotation
    ElseIf (KeyCode = vbKeyRight) Then
        PlayerAngle = PlayerAngle + PlayerRotation
    End If
End Sub

Private Sub Form_Load()
    CamWidth = 1028
    CamHeight = 720
    CamHalfHeight = CInt(CamHeight / 2)
    RayCastingPrecision = 100
    PlayerX = 2
    PlayerY = 3
    PlayerAngle = 0
    PlayerFOV = 60
    PlayerMovement = 0.1
    PlayerRotation = 0.8
    Me.Show
    LevelMap(0) = Array(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1)
    LevelMap(1) = Array(1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1)
    LevelMap(2) = Array(1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1)
    LevelMap(3) = Array(1, 0, 0, 0, 0, 0, 3, 3, 3, 0, 0, 0, 0, 0, 1)
    LevelMap(4) = Array(1, 0, 0, 0, 0, 0, 3, 3, 3, 0, 0, 0, 0, 0, 1)
    LevelMap(5) = Array(1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1)
    LevelMap(6) = Array(1, 0, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 1)
    LevelMap(7) = Array(1, 0, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 1)
    LevelMap(8) = Array(1, 0, 0, 0, 0, 0, 2, 2, 2, 0, 0, 0, 0, 0, 1)
    LevelMap(9) = Array(1, 0, 0, 0, 0, 0, 2, 2, 2, 0, 0, 0, 0, 0, 1)
    LevelMap(10) = Array(1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1)
    LevelMap(11) = Array(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1)
    blnGameLoop = True

    colors(0) = vbBlue
    colors(1) = vbGreen
    colors(2) = vbRed

    While (blnGameLoop = True)
        Me.Cls
        rayCasting
        blnGameLoop = True
        DoEvents
    Wend
End Sub

Private Sub Form_Unload(Cancel As Integer)
    blnGameLoop = False
End Sub

my problem is on these code:

 'Desenhando as paredes usando os tamanhos calculados acima
        DrawLine raycount, 0, raycount, CamHalfHeight - WallHeight, ColorConstants.vbCyan 'Sky
        If (Wall > 0) Then
            DrawLine raycount, CamHalfHeight - WallHeight, raycount, CamHalfHeight + WallHeight, colors(Wall) ' Wall
        End If
        DrawLine raycount, CamHalfHeight + WallHeight, raycount, CamHeight, vbMagenta ' floor
        Wall = 0

all vertical wall lines drawed have the same color even some are different color... i don't understand why :(

Which programming language is best Ludo game development?

The choice of programming language for developing a Ludo game will depend on the specific needs of the project, the skills of the development team, and the target platform. Here are some of the programming languages that can be used for Ludo game development:

C++: C++ is a high-performance programming language that is commonly used for game development. Many game engines, including Unreal Engine and Unity, are written in C++. It can be used for Ludo game development for desktop and mobile platforms.

Java: Java is a popular programming language for developing games for Android devices. It is cross-platform, easy to learn, and has a large community of developers.

C#: C# is a modern, object-oriented programming language that is used for developing games with the Unity engine. It can be used for developing Ludo games for desktop and mobile platforms.

JavaScript: JavaScript is a popular programming language for web-based games and game development with HTML5. It can be used for developing Ludo games that can be played in a web browser.

Python: Python is a general-purpose programming language that is often used for prototyping and scripting in game development. It can be used for Ludo game development for desktop and mobile platforms.

These are just a few of the programming languages that can be used for Ludo game and satta matka app development. The choice of programming language will depend on the specific needs of the project, the development team's skills, and the target platform.

nontype error obj has no attribute shoot

hello, i have a huge problem and dont know how to fix it. here is the code:

#(in class)
def shoot(self, current_time, bullet_group, enemy_group):
    if current_time - self.last_shot > self.shoot_count:
        bullet = Bullet(self.rect.centerx, self.rect.bottom, "death_star_laser1.png", 10)
        bullet_group.add(bullet)
        if current_time - self.last_shot > self.cooldown:
            self.last_shot = current_time
            return random.choice(enemy_group.sprites())     

#(just normal written in file)
if len(speed_enemy_group) > 0:
    choose_boss= random.choice(boss_enemy_group.sprites())

#(in while loop)
   if len(speed_enemy_group) > 0:
            choose_boss= choose_boss.shoot(time_now, enemy_bullet_group, boss_enemy_group)

i get error nontype ...

its because choose_boss(time_now,... --> choose_boss is yellow. but when i put the definition of choose boss in my while loop all is great but i wont do that because boss is shootng multiple bullets in one row and if i put "choose_boss= random.choice(speed_enemy_group.sprites())" in the while loop every time its another boss who shooting..

im happy if somebody can look at ths

I need help finishing this game

This is a simple zombie survival game, i need to have finished by tomorrow, and I am having multiple problems with vectors being out of range. I also need to change some stuff into classes and make inheritances. I have tried fixing the problems but no success so far and I don't know how to deal with vectors as well as I thought I would be able to, and also since I made the mistake of not making classes from the start it kind of makes things harder now.
this is the code.

#include <cstdio>
#include <ctime>
#include <iostream>
#include <windows.h>
#include <fstream>
#include <vector>
using namespace std;

bool zmbexist(vector<vector<int> >& sqarep, int posx, int posy);
int nrzombies(vector<vector<int> >& plain);
void display(vector<vector<int> >& terain);
bool movezombies(vector<vector<int> >& plain);
bool smartmovezombies(vector<vector<int> >& plain);
bool play(int nrz, int nrholes, vector<vector <int> >& plain);

int main()
{
    srand(time(NULL));
    vector<vector<int> > vectx;
    //initialise the vector
    vectx.resize(10);
    for (int i = 0; i < 10; i++)
    {
        vectx[i].resize(10, 0);
    }

    //convention : hole number is 3 , zombie number is 2, and human number is 1;
    //ask for nr of houls
    int nrholes;
    cout << "number of holes(0 for random) : ";
    cin >> nrholes;
    //if type 0 , then the nr of houls is generated automaticaly
    if (!nrholes)
    {
        nrholes = (rand() % 9) + 1;
    }

    //place the houls

    for (int i = 0; i < nrholes;)
    {
        int xhol = rand() % 10;
        int yhol = rand() % 10;
        if (vectx.at(xhol).at(yhol) == 0)
        {
            vectx.at(xhol).at(yhol) = 3;
            i++;
        }

    }

    //ask for nr of zombies
    int nrzombies;
    cout << "number of zombies(0 for random) : ";
    cin >> nrzombies;
    //if nr is 0, then is generated automaticaly
    if (!nrzombies)
    {
        nrzombies = (rand() % 9) + 1;
    }
    for (int i = 0; i < nrzombies;)
    {
        int xhol = rand() % 10;
        int yhol = rand() % 10;
        if (vectx.at(xhol).at(yhol) == 0)
        {
            vectx.at(xhol).at(yhol) = 2;
            i++;
        }
    }

    cout << "now we place the man";
    for (;;)
    {
        int xhol = rand() % 10;
        int yhol = rand() % 10;
        if (vectx.at(xhol).at(yhol) == 0)
        {
            vectx.at(xhol).at(yhol) = 1;
            break;
        }
    }
    display(vectx);
    play(nrzombies, nrholes, vectx);
    cin.ignore(255, '\n');
    return 0;
}

bool zmbexist(vector<vector<int> >& sqarep, int posx, int posy)
{
    if (sqarep[posx][posy] == 2)
        return true;
    else
        return false;

}
int nrzombies(vector<vector<int> >& plain)
{
    int nrzmb = 0;
    for (size_t i = 0; i < plain.size(); i++)
        for (size_t j = 0; j < plain[i].size(); j++)
        {
            if (plain[i][j] == 2)
                nrzmb++;
        }
    return nrzmb;
}
void display(vector<vector<int> >& terain)
{

    system("cls");
    cout << endl;
    for (size_t i = 0; i < terain.size(); i++)
    {
        for (size_t j = 0; j < terain[i].size(); j++)
        {
            switch (terain[i][j])
            {
            case -1:
                cout << " D ";
                break;
            case 0:
                cout << " * ";
                break;
            case 1:
                cout << " M ";
                break;
            case 2:
                cout << " Z ";
                break;
            case 3:
                cout << " G ";
                break;
            default:
                cout << " E ";
                break;
            }
        }
        cout << endl;
    }

    // Sleep(5000);
}
bool movezombies(vector<vector<int> >& plain)
{
    bool dead, zombiemove;
    for (size_t i = 0; i < plain.size(); i++)
    {
        for (size_t j = 0; j < plain[i].size(); j++)
        {
            //make sure that all the zombie moves

            if (plain[i][j] == 2)
            {
                zombiemove = false;
                while (!zombiemove)
                {
                    int rndmove = rand() % 4 + 1;
                    cout << rndmove << "\n";
                    // Sleep(1000);
                    cout << "now move zombie \n";
                    //move up if is possible

                    if (rndmove == 1)
                    {
                        cout << "move up \n";
                        if (i > 1)
                        {
                            if (plain[i - 1][j] == 3)
                            {
                                plain[i][j] = 0;
                                zombiemove = true;
                                //  break;
                            }
                            else if (plain[i - 1][j] == 1)
                            {
                                dead = true;
                                //return true;
                                zombiemove = true;

                            }
                            else if (plain[i - 1][j] == 0)
                            {
                                plain[i][j] = 0;
                                plain[i - 1][j] = 5;
                                zombiemove = true;
                                //break;

                            }
                        }
                    }
                    //move down if is possible
                    if (rndmove == 2)
                    {
                        cout << "move down \n";
                        if (i < 9)
                        {
                            if (plain[i + 1][j] == 3)
                            {
                                plain[i][j] = 0;
                                zombiemove = true;
                                //break;
                            }
                            else if (plain[i + 1][j] == 1)
                            {
                                dead = true;
                                //return true;
                                zombiemove = true;
                                //break;
                            }
                            else if (plain[i + 1][j] == 0)
                            {
                                plain[i][j] = 0;
                                plain[i + 1][j] = 5;
                                zombiemove = true;
                                //break;

                            }
                        }
                    }
                    //move left if is possible
                    if (rndmove == 3)
                    {
                        cout << "move left \n";
                        if (j > 1)
                        {
                            if (plain[i][j - 1] == 3)
                            {
                                plain[i][j] = 0;
                                zombiemove = true;
                                //break;
                            }
                            else if (plain[i][j - 1] == 1)
                            {
                                dead = true;
                                zombiemove = true;
                                //return true;
                            }
                            else if (plain[i][j - 1] == 0)
                            {
                                plain[i][j] = 0;
                                plain[i][j - 1] = 5;
                                zombiemove = true;
                                //  break;
                            }
                        }
                    }
                    //move left if is possible
                    if (rndmove == 4)
                    {
                        cout << "move right \n";
                        if (j < 9)
                        {
                            if (plain[i][j + 1] == 3)
                            {
                                plain[i][j] = 0;
                                zombiemove = true;
                                //break;
                            }

                            else if (plain[i][j + 1] == 1)
                            {
                                dead = true;
                                //  return true;
                                zombiemove = true;
                            }
                            else if (plain[i][j + 1] == 0)
                            {
                                plain[i][j] = 0;
                                plain[i][j + 1] = 5;
                                zombiemove = true;
                                //  break;
                            }
                        }
                    }
                }//end while
            }
        }
    }
    //}
    for (size_t i = 0; i < plain.size(); i++)
    {
        for (size_t j = 0; j < plain[i].size(); j++)
        {
            if (plain[i][j] == 5)
                plain[i][j] = 2;
        }
    }
    return false;
}
bool movehuman(vector<vector<int> >& plain)
{
    char move;
    bool dead;
    bool pmove = false;
    int x = 0, y = 0;
    for (size_t i = 0; i < plain.size(); i++)
        for (size_t j = 0; j < plain[i].size(); j++)
        {
            if ((plain[i][j]) == 1)
            {
                x == i;
                y == j;
            }

        }

    while (!pmove)
    {
        system("cls");
        display(plain);
        cout << "move human (2=down,8=up,4=left,6=right): ";
        cin >> move;
        cout << move;
        if (move == 52)
        {
            if (y > 0)
            {
                if ((plain[x][y - 1] == 3) || (plain[x][y - 1] == 2))
                {
                    cout << "is mort acuma2";
                    Sleep(2000);
                    dead = true;
                    //  return dead;
                }
                plain[x][y] = 0;
                plain[x][y - 1] = 1;
                y--;
                pmove = true;
            }

        }

        if (move == 54)
        {
            if (y < 9)
            {
                if ((plain[x][y + 1] == 3) || (plain[x][y + 1] == 2))
                {
                    return true;
                }
                plain[x][y] = 0;
                plain[x][y + 1] = 1;
                y++;
                pmove = true; 
            }

        }
        if (move == 56)
        {
            if (x > 0)
            {
                if ((plain[x - 1][y] == 3) || (plain[x - 1][y] == 2))
                {
                    return true;
                }
                plain[x][y] = 0;
                plain[x - 1][y] = 1;
                x--;
                pmove = true;
            }

        }

        if (move == 50)
        {
            if (x < 9)
            {
                if ((plain[x + 1][y] == 3) || (plain[x + 1][y] == 2))
                {
                    return true;
                }
                plain[x][y] = 0;
                plain[x + 1][y] = 1;
                x++;
                pmove = true;
            }

        }
    }
    return dead;
}
bool smartmovezombies(vector<vector<int> >& plain)
{

    size_t x = 0;
    size_t y = 0;

    //get human position

    for (size_t i = 0; i < plain.size(); i++)
    {
        for (size_t j = 0; j < plain[i].size(); j++)
        {
            if (plain[i][j] == 1)
            {
                x = i;
                y = j;
                break;
            }
        }
    }
    //for everyzombie possition calculate how to get closer to human quickly
    for (size_t i = 0; i < plain.size(); i++)
        for (size_t j = 0; j < plain[i].size(); j++)
        {
            if (plain[i][j] == 2)
            {

                if ((i > x) && (j > y))
                {
                    if (i - x > j - y)
                        if (plain[i - 1][j] == 2)
                            plain[i][j] = 0;
                        else
                        {
                            if (i > 1)
                            {
                                plain[i][j] = 0;
                                plain[i - 1][j] = 5;
                            }
                        }

                    else
                    {
                        if (plain[i][j - 1] == 2)
                            plain[i][j] = 0;
                        else
                        {
                            if (j > 1)
                            {
                                plain[i][j] = 0;
                                plain[i][j - 1] = 5;
                            }
                        }

                    }

                }

                if ((i < x) && (j < y))
                {
                    if (i - x > j - y)
                        if (plain[i + 1][j] == 2)
                            plain[i][j] = 0;
                        else
                        {
                            if (i < 10)
                            {
                                plain[i][j] = 0;
                                plain[i + 1][j] = 5;
                            }
                        }

                    else
                    {
                        if (plain[i][j + 1] == 2)
                            plain[i][j] = 0;
                        else
                        {
                            if (j < 10)
                            {
                                plain[i][j] = 0;
                                plain[i][j + 1] = 5;
                            }
                        }

                    }

                }

                if ((i < x) && (j > y))
                {
                    if (i - x > j - y)
                        if (plain[i + 1][j] == 2)
                            plain[i][j] = 0;
                        else
                        {
                            if (i < 10)
                            {
                                plain[i][j] = 0;
                                plain[i + 1][j] = 5;
                            }
                        }

                    else
                    {
                        if (plain[i][j - 1] == 2)
                            plain[i][j] = 0;
                        else
                        {
                            if (j > 1)
                            {
                                plain[i][j] = 0;
                                plain[i][j - 1] = 5;
                            }
                        }

                    }

                }

                if ((i > x) && (j < y))
                {
                    if (i - x > j - y)
                        if (plain[i - 1][j] == 2)
                            plain[i][j] = 0;
                        else
                        {
                            if (i > 1)
                            {
                                plain[i][j] = 0;
                                plain[i - 1][j] = 5;
                            }
                        }

                    else
                    {
                        if (plain[i][j + 1] == 2)
                            plain[i][j] = 0;
                        else
                        {
                            if (j > 1)
                            {
                                plain[i][j] = 0;
                                plain[i][j + 1] = 5;
                            }
                        }

                    }

                }

                if ((plain[i - 1][j] == 1) || (plain[i + 1][j] == 1) || (plain[i][j + 1] == 1) || (plain[i][j - 1] == 1))
                {
                    return true;
                }
            }

        }
    for (size_t i = 0; i < plain.size(); i++)
        for (size_t j = 0; j < plain[i].size(); j++)
        {
            if (plain[i][j] == 5)
                plain[i][j] = 2;

        }
    return false;

}
bool play(int nrz, int nrholes, vector<vector<int> >& plain)
{
    bool dead, endgame;
    endgame = false;
    dead = false;
    while (true)
    {
        endgame = smartmovezombies(plain);
        dead = movehuman(plain);
        nrz = nrzombies(plain);
        if (dead = true)
        {
            cout << "human dead";
            exit(1);
        }
        if (nrz == 0)
        {
            cout << "human win";
            exit(1);
        }
    }
    return true;
}

NFT Marketplace Blur Releases Native Token for Community Ownership

After months of anticipation, zero-fee non-fungible token (NFT) marketplace Blur released its native token Tuesday.
The token will allow traders to participate in the platforms governance protocol, as well as profit from the marketplaces success through community ownership.
Blur said in a tweet that traders have 60 days to claim their airdropped BLUR tokens, which are trading at roughly 50 cents at press time, according to CoinGecko.
Since launching [four] months ago, 146,823 users have traded $1.2 billion dollars [sic] worth of NFTs on Blur (wash trading excluded), Blur said in a tweet. This growth is breathtaking and was only possible with the support of the Blur community.
According to data from DappRadar, Blurs 24-hour trading volume stands at about $9.5 million, second only to leading marketplace OpenSea, whose trading volume is around $12 million.
NFT traders have been awaiting the BLUR tokens release since the platform went live. Originally set to release in January, Blur has been airdropping its token since October through care packages to collectors who have traded an Ethereum-based NFT in the past six months. On Tuesday, Blur delayed their token-launch by 90 minutes, warning collectors to be aware of potential phishing attempts and scam links.
Blur launched in October with a strategy to cater to professional NFT traders with a zero-fee marketplace. In its first 24 hours, it conducted $2.5 million in trading volume, creeping up on OpenSeas trading volume. While the royalty-optional marketplace has added fuel to the fire to the ongoing debate among creators and marketplaces, it has continued to trail behind OpenSeas trading volume numbers.
Launched in October, Blur's strategy is to cater to the needs of professional NFT traders in the zero-fee market, which has led to many NFT games having partnerships with them, such as CryptoKittes, F-Cat P2E crypto game. In the first 24 hours, his trading volume...

How To Solve Android Studio Gradle Build Failure

I was trying to make an app On Android Studio. During the making of the app on Android studio, it gives an error. The error was about the Gradle bundle failing.

I neglected this error while creating. I thought this might be due to the slow process and net speed. But after some time, when I pushed the tab for the final step, the pop-up appears that the generate the app failed. It took almost 2 hours to do.

Is there any senior app developer who can help me out in solving this irritating problem?

How long does it take to develop a game

Hello, I would like to know how much time is taking to develop a game, you may ask why am I asking this question the reason is that I'm a newbie in this field and it will be my 1st project doing practically, I was a little bit confused about it.