win7去掉共享文件夹上面的小锁头

共享文件夹“属性” - “安全”选项中,选择“高级” - >“权限”中选择“更改权限”,勾选“权限是可以继承的父对象确定后,你可以看到一个小锁的图标消失.
以下是一个简单的穿越火线锁头C语言程序: ```c #include <stdio.h> #include <stdlib.h> #include <time.h> #define MAP_SIZE 9 #define CHESS_EMPTY 0 #define CHESS_PLAYER1 1 #define CHESS_PLAYER2 2 int map[MAP_SIZE][MAP_SIZE]; int player; int row, col; int gameOver = 0; void initMap(){ for(int i = 0; i < MAP_SIZE; i++){ for(int j = 0; j < MAP_SIZE; j++){ map[i][j] = CHESS_EMPTY; } } } void drawMap(){ printf(" "); for(int i = 0; i < MAP_SIZE; i++){ printf("%d ", i); } printf("\n"); for(int i = 0; i < MAP_SIZE; i++){ printf("%2d ", i); for(int j = 0; j < MAP_SIZE; j++){ switch(map[i][j]){ case CHESS_EMPTY: printf(". "); break; case CHESS_PLAYER1: printf("O "); break; case CHESS_PLAYER2: printf("X "); break; } } printf("\n"); } } void input(){ printf("Player %d's turn\n", player); printf("Enter row and column (e.g. 2 3): "); scanf("%d %d", &row, &col); } void placeChess(){ if(map[row][col] == CHESS_EMPTY){ map[row][col] = player; int count = 0; for(int i = -1; i <= 1; i++){ for(int j = -1; j <= 1; j++){ if(row + i >= 0 && row + i < MAP_SIZE && col + j >= 0 && col + j < MAP_SIZE){ if(map[row + i][col + j] == player){ count++; } } } } if(count >= 5){ gameOver = 1; } if(player == CHESS_PLAYER1){ player = CHESS_PLAYER2; } else { player = CHESS_PLAYER1; } } else { printf("Invalid input, please try again!\n"); } } int main(){ initMap(); drawMap(); player = CHESS_PLAYER1; while(!gameOver){ input(); placeChess(); drawMap(); } printf("Game over! Player %d wins!", player); return 0; } ``` 这个程序实现了一个简单的穿越火线锁头游戏,使用了二维数组来表示棋盘状态,并在控制台中运行。玩家轮流输入行和列来放置棋子,并在有五个相邻棋子时获胜。游戏结束后,程序会输出获胜者的信息。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值